Backup Permissions Issue
nagac
Posts: 18
Hi
I have got issue while running the Red Gate Backup script which says
3/4/2015 5:28:50 PM: Warning 300: Backup failed. Retry attempt: 3
3/4/2015 5:28:54 PM: VDI error 1000: Access is denied.
You may need to run SQL Backup using an account that has administrator rights on this machine.
The user id which I am using has admin rights on Database and login to the system also has admin rights.
Can someone suggest what needs to be done to make this working?
Thanks
I have got issue while running the Red Gate Backup script which says
3/4/2015 5:28:50 PM: Warning 300: Backup failed. Retry attempt: 3
3/4/2015 5:28:54 PM: VDI error 1000: Access is denied.
You may need to run SQL Backup using an account that has administrator rights on this machine.
The user id which I am using has admin rights on Database and login to the system also has admin rights.
Can someone suggest what needs to be done to make this working?
Thanks
Comments
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Yes, it has sysadmin role. Backup work's well when I manually do it through GUI. But only the issue with Script.
I found an error in Application Event Log as below that might give you some more info to narrow the error.
SQLVDI: Loc=CVDS::CreateEx. Desc=Create Memory. ErrorCode=(5)Access is denied.
. Process=5356. Thread=1612. Client. Instance=. VD=GlobalSQLBACKUP_156C4973-E676-4BE9-B29A-66C355EA5276_SQLVDIMemoryName_0.
Thanks
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sorry for the delayed response this is due to the licensing issue with the product.
I have got the below output:
Backing up model (full database) to:
C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBackupFULL_(local)_model_20150306_101021.sqb
Database size : 2.750 MB
Compressed data size: 198.000 KB
Compression rate : 92.97%
Processed 168 pages for database 'model', file 'modeldev' on file 1.
Processed 1 pages for database 'model', file 'modellog' on file 1.
BACKUP DATABASE successfully processed 169 pages in 0.052 seconds (25.390 MB/sec).
SQL Backup process ended.
exitcode 0
sqlerrorcode 0
filename001 C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBackupFULL_(local)_model_20150306_101021.sqb
Thanks
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQLBackupC.exe -E -SQL "BACKUP DATABASE [%%I] TO DISK='%DBBACKUP_PATH%!DBBACKUPFILENAME!' WITH PASSWORD = '<ENCRYPTEDPASSWORD>IxY6YeZHYWfKje1nc/a5Y97mc3XalU5piw==</ENCRYPTEDPASSWORD>', COMPRESSION = 4
The account you are logged on as needs to have the SQL Server sysadmin server role assigned to it. Being the owner of the database you are trying to back up is not enough.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I have checked the roles the user id i am using while connecting to command prompt has sysadmin role. Sql backup Agent is running by using the same user.
What is the returned value? After that, in the same command prompt window, try running the following:
What is the result?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Below are the outputs from the given commands
osql -E -S .<your instance name> -Q "SELECT IS_SRVROLEMEMBER('sysadmin')"
sqlbackupc -sql "BACKUP DATABASE model TO DISK = [<AUTO>]"'
Thanks
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I googled the error and it says user id should have rights on Create Global Objects. Is that the one I need to look now?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I just found something weird here, I had scheduled the script through windows task scheduler and it worked fine without any errors. however it doesn't work only when I run it manually. I used same user in both these cases.
Thanks
- you can run a backup using the SQL Backup extended stored procedure in Management Studio
- you can run a SQL Backup backup job using SQL Server Agent
- you cannot run a SQL Backup backup from the command prompt
- you can run a SQL Backup backup task using Windows Task Scheduler
Is this correct?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
You are absolutely right.
Thanks
Naga
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
thanks
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
We have got temporary solution from Support for this solution but there is no solution for automation
runas /netonly /user:domainuser cmd
Backup works when I do this before I execute the actual Backup process. But this needs to be configured in system without using the above steps.
E.g. from the command prompt, can you run the following successfully (change the -E and -S values to match your environment):
This uses the SQL Server sqlcmd interface to run the backup. It uses trusted authentication (the -E option), though you can also use SQL Server authentication. Also, the Windows account you are currently logged on as needs to have rights to connect to the SQL Server instance, execute the sqlbackup extended stored procedure, and also rights to back up the model database.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8