I know that I can verify backup files while the backup itself is running. However, I'm trying to shorten my backup window and would like to run the verify option separately against the backup files. Is that possible?
Comments
2 comments
-
You can verify backup files at any time by using the RESTORE VERIFYONLY syntax e.g.
DECLARE @errorcode INT DECLARE @sqlerrorcode INT EXEC master..sqlbackup '-sql "RESTORE VERIFYONLY FROM DISK = [e: emppubs01.sqb]"', @errorcode OUT, @sqlerrorcode OUT SELECT @errorcode, @sqlerrorcode
You can find the latest backup files from the msdb..backupset and msdb..backupmediafamily tables. The 2 tables are linked using the media_set_id value. -
Thanks for this. I was wondering the same thing as jmeyer.
Add comment
Please sign in to leave a comment.