This article will enable you to deal with these error messages when creating a scheduled job for SQL Backup:
Error 880: BACKUP DATABASE permission denied in database: (XXX)
SQL error 15157: Setuser failed because of one of the following reasons: the database principal 'XXX'
When you run the sqlbackup extended stored procedure, SQL Backup will first check the backup/restore rights of the user account requesting the task; it uses the SETUSER function to impersonate the logged on user account. For scheduled tasks this is the owner of the job or the SQL Agent account, for ad-hoc backup or restore tasks using the Backup or Restore wizards in the GUI, this is the account running the GUI.
In SQL 2008 and higher, the SETUSER function may be disabled or the account authentication will fail due to an issue known as 'double hop authentication' and has to do with how user security is set up on your Windows domain.
To work around this, you can disable the security check that SQL Backup performs by creating the SkipChecks registry key. To create the SkipChecks key, using Regedit navigate to the following Registry Folder:
HKEY_LOCAL MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal(LOCAL) or <SQL Instance Name>
Create a new DWORD type registry key called SkipChecks and give this new key a data value of 1.
Stop and restart the SQL Backup Agent service.
Once the registry key has been created, SQL Backup will skip the user right checks for backup and restore tasks.
Was this article helpful?
Articles in this section
- Resolving Error 507 and SQL Error 18456 in PCC Backup Restores
- SQL Backup error 605
- SQL Backup Error: Cannot access resource
- SQL Error 3203
- Error - Cannot load the DLL xp_sqlbackup.dll, or one of the DLLs it references
- Failed to obtain the list of cluster nodes
- Log Copy Queue is stuck in SQL Backup
- SQL Backup Network Share Permissions Test
- SQL Backup troubleshooting
- Errors when running a scheduled job with SQL Backup