This is the code SQL Backup 7 generates for a Scheduled Restore...
DECLARE @exitcode int
DECLARE @sqlerrorcode int
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE [TCM] FROM DISK = ''\\server_path\backup_path\App_name\*.bak'' SOURCE = ''dbname'' LATEST_ALL WITH RECOVERY, DISCONNECT_EXISTING, MOVE DATAFILES TO ''E:\DB'', MOVE LOGFILES TO ''F:\USERDBLOGS'', REPLACE, ORPHAN_CHECK, CHECKDB = ''NO_INFOMSGS, ALL_ERRORMSGS''"', @exitcode OUT, @sqlerrorcode OUT
IF (@exitcode >= 500) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup failed with exit code: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END
I am getting the following error...
Error 507: No valid backup sets found from provided folder(s). SQL Backup exit code: 507
Can SQL Backup restore .bak files or do they have to be .sqb files?[/img]
DECLARE @exitcode int
DECLARE @sqlerrorcode int
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE [TCM] FROM DISK = ''\\server_path\backup_path\App_name\*.bak'' SOURCE = ''dbname'' LATEST_ALL WITH RECOVERY, DISCONNECT_EXISTING, MOVE DATAFILES TO ''E:\DB'', MOVE LOGFILES TO ''F:\USERDBLOGS'', REPLACE, ORPHAN_CHECK, CHECKDB = ''NO_INFOMSGS, ALL_ERRORMSGS''"', @exitcode OUT, @sqlerrorcode OUT
IF (@exitcode >= 500) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup failed with exit code: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END
I am getting the following error...
Error 507: No valid backup sets found from provided folder(s). SQL Backup exit code: 507
Can SQL Backup restore .bak files or do they have to be .sqb files?[/img]