Error 880 permission problem with scheduled backup
nmalhot
Posts: 3
Hi. Been a long time SQL Backup user ... maybe too long because having a brain fart with just basic setup:
New Windows Web Server 2008 64-Bit Server and new SQLBackup 6.1 installed.
Just want to test my installs and doing a backup on the master db from within SQL Backup works fine. Trying to make a scheduled backup within SQL Backup gives me the following error:
7/30/2009 4:20:25 PM: Backing up master (full database) to:
7/30/2009 4:20:25 PM: \MSSQL\MSSQL10.MSSQLSERVER\MSSQL\Backup\FULL_(local)_master_20090730_162025.sqb
7/30/2009 4:20:26 PM: Error 880: BACKUP DATABASE permission denied in database: (master)
7/30/2009 4:20:26 PM: SQL error 15157: Setuser failed because of one of the following reasons: the database principal '28455-DB2\MSSQL_USER' does not exist, its corresponding server principal does not have server access, this type of database principal
cannot be impersonated, or you do not have permission.
The SQL Backup Agent service is running under Administrator and when I connect to MS SQL Manager I use windows authentication and as administrator, that works fine also.
The Activity History in SQL Backup also shows Successful backups on the master db from the MS Backup plan for the same 28455-DB2\MSSQL_USER User Name that is showing as a failure with the SQL Backup scheduled backup.
Any thoughts on what I'm doing wrong?
New Windows Web Server 2008 64-Bit Server and new SQLBackup 6.1 installed.
Just want to test my installs and doing a backup on the master db from within SQL Backup works fine. Trying to make a scheduled backup within SQL Backup gives me the following error:
7/30/2009 4:20:25 PM: Backing up master (full database) to:
7/30/2009 4:20:25 PM: \MSSQL\MSSQL10.MSSQLSERVER\MSSQL\Backup\FULL_(local)_master_20090730_162025.sqb
7/30/2009 4:20:26 PM: Error 880: BACKUP DATABASE permission denied in database: (master)
7/30/2009 4:20:26 PM: SQL error 15157: Setuser failed because of one of the following reasons: the database principal '28455-DB2\MSSQL_USER' does not exist, its corresponding server principal does not have server access, this type of database principal
cannot be impersonated, or you do not have permission.
The SQL Backup Agent service is running under Administrator and when I connect to MS SQL Manager I use windows authentication and as administrator, that works fine also.
The Activity History in SQL Backup also shows Successful backups on the master db from the MS Backup plan for the same 28455-DB2\MSSQL_USER User Name that is showing as a failure with the SQL Backup scheduled backup.
Any thoughts on what I'm doing wrong?
Comments
If this is a scheduled job, SQL Backup relies upon the SQL Server Agent to trigger the job. The SQL Backup Agent Server connects to the SQL Server and checks to see if the user account for the SQL Server Agent has permissions to perform the backup using the setuser command.
SQL Backup can be configured not to perform these additional security checks by adding the SkipChecks registry key, as follows:
1. Using Regedit navigate to the following Registry Folder:
HKEY_LOCAL MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\(LOCAL) or <SQL Instance Name>
2. Create a new DWORD type registry key called SkipChecks and give this new key a data value of 1.
Once the registry key has been created, SQL Backup will skip the user right checks for backup and restore tasks.
Kindly let us know if this resolves the issue.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
I Added the suggested key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQL Backup\BackupSettingsGlobal\(LOCAL)]
"SkipChecks"=dword:00000001
I am still unable to execute scheduled backups with the following error message appearing for every attempted database backup in the redgate logs:
As I am sure you are aware, MSDN suggests of SQL 2008 (http://msdn.microsoft.com/en-us/library/ms186297.aspx):
The article also states:
Do I need to change my SQL Agent account to run under a SQL Server User? Do you have any other suggestions?
Thank you.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\SQL Backup\BackupSettingsGlobal\(local) or SQL Instance Name.
Create a new DWORD type key called SkipChecks and give the key a data value of 1.
Kindly let us know if this fixes the issue.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
We are pleased that your issue is resolved
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Run the Red Gate SQL Backup agent as Local System. Job done.
Got exactly this problem but my server doesn't have the registry key you mentioned! So, what?
Mi SQL Server machine is running on Windows Server Web Service Pack 2 and is a 64 Bit Operating System.
Please help!
Thanks in advance.
Cheers, AJ
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Thank you very much.
Best regards,
AJ
Cheers.
I tried to find this fix for a long time , ha ha.
Thanks.
I would suggest that Red Gate make this the default--as I don't understand the value of the broken functionality that this registry setting disables.
At a minimum, Red Gate should move the setting from the registry to a configuration setting accessible from the application, and should provide a link or a reference from the error message to that configuration setting.
Come on Redgate this needs to be addressed! Wasted a lot of time thinking it was a permission issue when actually it isn't.
This registry fix resolved my problem Windows 2008 R2 Standard x64 & SQL 2008 R2 SP1.
It is not a firewall issue nor a broken SQL Server. This only affects SQL 2008 and higher instances running on Server 2008 and higher.
My opinion is that the problem is with Red Gate's reliance on SETUSER and SQL 2008 and higher on Windows Server 2008 and higher usage of Service SIDs.
From MSDN http://msdn.microsoft.com/en-us/library/ms143504.aspx:
In SQL 2005, if you used domain accounts for the SQL services the local groups COMPUTER\SQLServer2005MSSQLUser$ComputerName$MSSQLSERVER and COMPUTER\SQLServer2005SQLAgentUser$ComputerName$MSSQLSERVER
would get created and they would contain those domain service accounts. Those groups were granted Sysadmin rights on the SQL 2005 instance.
In SQL 2008 and higher, when running on Windows 2008 and higher, the situation changes. Those local groups are still created and granted Sysadmin rights, but if you look at the members of those local groups, you won't find the domain accounts listed as members. Instead you will find the Service SIDs created during setup, listed as 'NT SERVICE\MSSQLSERVER (SID GUID)'
This is actually a good thing! The SQL Agent account still has Sysadmin rights so there should not be a permissions issue... except if you use a deprecated function such as SETUSER which is not able to handle this scenario.
So IMHO it is a problem that Red Gate needs to address with their product. As other users here, I wasted a lot of time trying to figure out a permissions issue that didn't exist. For you to put the onus back on your customers comes across as arrogant and insulting. We know what we're doing.
http://www.red-gate.com/MessageBoard/vi ... skipchecks
Can you tell me how to fix this? Thanks.
HKEY_LOCAL MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\<SQL Instance Name>
regardless of whether it's a 32-bit or 64-bit SQL Server instance.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
You need to use the name of the instance, not that of the server. E.g. if your instance name is 'PRODINST', your registry node would be
HKEY_LOCAL MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\PRODINST
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I substituted the name that shows in Object Explorer for the Server Name.
I also tried the value that shows in the registry under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL, which has a DWORD of MSSQLSERVER with a value of MSSQL10_50.MSSQLSERVER. I tried this last value of the DWORD. It did not work.
I still get the same error when I run the Job.
HKEY_LOCAL MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\(local)
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
The key I'm filling is this.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate\BackupSettingsGlobal\<Instance Name> with DWORD SkipChecks with a value of 1. I've also tried QWORD SkipChecks with a value of 1.
Thanks for your help.
Thanks, Petey!!!
From version 6.4 onward, SQL Backup stores its settings in the HKEY_LOCAL MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\ node, even on 64-bit operating systems.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Is this fixed in releases later than 6.5.1.9?
I spent a day on this issue and I am sure there are a lot more out there that have done the same thing.
I have a lot of servers that I will be migrating to SS 2012 and I would rather not make it a common practice to modify registry settings for all of my installs.
Please advise of an ETA for the solution.
Thank You
On an active / passive 2008R2 Windows Cluster, RedGate 7 ... do we have to change registry settings on both nodes or just the active one?
I actually went to the passive one (the one who does not own the SAN) and while I can see the registry keys, everything is empty there.
Any ideas?
I am not a big fan or messing around with registry, especially on a Win Cluster, so I did not alter the passive node.
Thanks,