Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2012-02-13 : 10:38:07
|
| Dear Friends,It is known that Restore Verifyonly is to verify whether backupset is valid or not.It gives immediate result for small db backup whereas for large backup it takes more time as of restoring the DB.I want to know whether is there any quick\fast option to verify the backup set is valid or not. Thanks SG |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2012-02-13 : 10:41:51
|
Not to my knowledgeDECLARE @backupSetId intSELECT @backupSetId = position FROM msdb..backupset WHERE database_name=N'<dbname>' AND backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'<dbname>' ) IF @backupSetId is null BEGIN raiserror(N'Verify failed. Backup information for database ''myActions'' not found.', 16, 1) ENDRESTORE VERIFYONLY FROM DISK = N'<file path>\<database backup file>.BAK' WITH FILE = @backupSetId, NOUNLOAD, NOREWINDGO Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
 |
|
|
|
|
|