The option to verify isn't available. Is this by design? If I alter the script to perform a verify, will it have a negative impact in some way?
Comments
3 comments
-
The VERIFY option is only used by the GUI, to run a RESTORE VERIFYONLY command after the backup has been made. It is ignored when ran from the extended stored procedure or command line.
-
We are eval'ing SQL Backup, and I'm wondering if it is possible to put a second step in my SQL Server Agent job to run Restore Verifyonly as mentioned in the response below. We usually generate jobs to SQL Server Agent for our backups, so if that would still work in a job step that would satisify our needs.
-
Hello,
Sure! You can put a RESTORE VERIFYONLY in a SQL Agent job:
exec master..sqlbackup '-SQL "RESTORE VERIFYONLY FROM DISK=[file]"'
You would need to include some sort of RAISERROR or notification in the script so you know that the verify raised an error.
Add comment
Please sign in to leave a comment.