B Bruce Lee Mar 25, 2004 #1 I want to get the backup set name from a database backup file. How can I do? Thanks, Bruce
A Andrew J. Kelly Mar 25, 2004 #2 You might want to check out RESTORE HEADERONLY and RESTORE FILELISTONLY in BooksOnLine.
S Sue Hoegemeier Mar 25, 2004 #3 You can use restore headeronly - e.g. restore headeronly from disk = 'C:\YourBackup.bak' You can find more info in books online. -Sue
You can use restore headeronly - e.g. restore headeronly from disk = 'C:\YourBackup.bak' You can find more info in books online. -Sue
B Bruce Lee Mar 25, 2004 #4 Thanks Andrew and Sue. The Restore Headeronly works well. But is it possible to get the name from the SQLDMO classes? Thanks, Bruce
Thanks Andrew and Sue. The Restore Headeronly works well. But is it possible to get the name from the SQLDMO classes? Thanks, Bruce
T Tim Mar 25, 2004 #5 Yes. Take a look at ReadBackupHeader Method of the Restore object in BOL / MSDN. It gives a QueryResults set. - Tim
Yes. Take a look at ReadBackupHeader Method of the Restore object in BOL / MSDN. It gives a QueryResults set. - Tim
S Stefan Delmarco [MSFT] Mar 25, 2004 #6 Have a look at the ReadBackupHeader method on the Restore / BackupDevice / SQLServer objects http://msdn.microsoft.com/library/en-us/sqldmo/dmoref_m_r_2u5u.asp?frame=true. Cheers, Stefan
Have a look at the ReadBackupHeader method on the Restore / BackupDevice / SQLServer objects http://msdn.microsoft.com/library/en-us/sqldmo/dmoref_m_r_2u5u.asp?frame=true. Cheers, Stefan