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?
jmeyer
0

Comments

2 comments

  • petey
    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.
    petey
    0
  • rondanyd
    Thanks for this. I was wondering the same thing as jmeyer.
    rondanyd
    0

Add comment

Please sign in to leave a comment.