Restore is failing
st8floorsup
Posts: 27
master..sqlbackup N'-SQL "RESTORE DATABASE [XRestore10302007]
FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''
WITH RECOVERY,
MOVE ''XNewStructure'' TO ''\\ABC\h$\MSSQL2005\XRestore10302007.mdf'',
MOVE ''XNewStructure_log'' TO ''\\ABC\h$\MSSQL2005\XRestore10302007_Log.ldf''
"'
SQL Backup v5.0.0.2770
Restoring XRestore10302007 (database) on SQL2005 instance from:
\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb
Error 890: RESTORE DATABASE permission denied for database: (XRestore10302007)
SQL error 15157: Setuser failed because of one of the following reasons: the database principal 'THEMAN' 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.
SQL Backup exit code: 890
SQL error code: 15157
'THEMAN' has sysadmin (all server roles) rights.
SQL Backup Agent is running as Local System.
I was able to run these commands just fine:
master..sqlbackup '-SQL "RESTORE FILELISTONLY FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''"'
master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''"'
master..sqlbackup '-SQL "RESTORE VERIFYONLY FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''"'
FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''
WITH RECOVERY,
MOVE ''XNewStructure'' TO ''\\ABC\h$\MSSQL2005\XRestore10302007.mdf'',
MOVE ''XNewStructure_log'' TO ''\\ABC\h$\MSSQL2005\XRestore10302007_Log.ldf''
"'
SQL Backup v5.0.0.2770
Restoring XRestore10302007 (database) on SQL2005 instance from:
\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb
Error 890: RESTORE DATABASE permission denied for database: (XRestore10302007)
SQL error 15157: Setuser failed because of one of the following reasons: the database principal 'THEMAN' 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.
SQL Backup exit code: 890
SQL error code: 15157
'THEMAN' has sysadmin (all server roles) rights.
SQL Backup Agent is running as Local System.
I was able to run these commands just fine:
master..sqlbackup '-SQL "RESTORE FILELISTONLY FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''"'
master..sqlbackup '-SQL "RESTORE SQBHEADERONLY FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''"'
master..sqlbackup '-SQL "RESTORE VERIFYONLY FROM DISK = ''\\ABC\g$\SQLBackup\SQLe01\SQL2005\X-20071030_030444_full.sqb''"'
Comments
Could you please try logging in as another user to perform the restore? The user does not need to have sysadmin rights, just rights to perform the restore and use the SQL Backup extended stored procedure.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8