Restore - Latest Full -- Errors
rayherring
Posts: 30 Bronze 4
Hi All,
I don't understand why I receive an error from this code.
I am using SQL Backup 7 (Server Components 7.7.0.7), Widows 2008R2EE, SQL2008R2 Std.
This version of the script works fine.
Any Suggestions?
Thanks,
I don't understand why I receive an error from this code.
I am using SQL Backup 7 (Server Components 7.7.0.7), Widows 2008R2EE, SQL2008R2 Std.
This version of the script works fine.
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE Test_SIR25 FROM DISK = ''X:TestRestoresSim-SQL-02MSSQLSIR25Sim-SQL-02_SIR25_FULL_20160109_223000.sqb'' WITH NoRECOVERY, Replace , MOVE ''SIR25_Sys'' TO ''S:DB_RestoreTestSIR25_Data.mdf'' , MOVE ''SIR25_Blob_A'' TO ''S:DB_RestoreTestSIR25_Blob_A.ndf'' , MOVE ''SIR25_Data_A'' TO ''S:DB_RestoreTestSIR25_Data_A.ndf'' , MOVE ''SIR25_Index_A'' TO ''S:DB_RestoreTestSIR25_Index_A.ndf'' , MOVE ''sir25_log'' TO ''L:TestRestoreSIR25_Log.ldf'' "';This version fails immediately with the error message "Error 507: No valid backup sets found from provided folder(s)."
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE Test_SIR25 FROM DISK = ''X:TestRestoresSim-SQL-02MSSQLSIR25Sim-SQL-02_SIR25_FULL_*.sqb'' Latest_Full WITH NoRECOVERY, Replace , MOVE ''SIR25_Sys'' TO ''S:DB_RestoreTestSIR25_Data.mdf'' , MOVE ''SIR25_Blob_A'' TO ''S:DB_RestoreTestSIR25_Blob_A.ndf'' , MOVE ''SIR25_Data_A'' TO ''S:DB_RestoreTestSIR25_Data_A.ndf'' , MOVE ''SIR25_Index_A'' TO ''S:DB_RestoreTestSIR25_Index_A.ndf'' , MOVE ''sir25_log'' TO ''L:TestRestoreSIR25_Log.ldf'' "';As you see, I just replaced the Date/Time string with * and appended Latest_Full. I know I have used this script before. It is part of a semi-automated process to do test restores of production databases from tape archives. I don't understand why it fails now.
Any Suggestions?
Thanks,
Ray Herring
Comments
E.g
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE Test_SIR25 FROM DISK = ''X:TestRestoresSim-SQL-02MSSQLSIR25Sim-SQL-02_SIR25_FULL_*.sqb'' SOURCE = [SIR25] LATEST_FULL WITH NoRECOVERY, ...
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
All I had to do was read one or two sentences farther in the documentation and I would have answered my own question (plus saved a lot of time )
Thanks for the assistance.