November 2, 2009 at 7:08 am
I have been tasked with testing the validity of the bak files in my DB's.
Is there a script that can test that my bak file appears good, without actually restoring the DB?
November 2, 2009 at 7:37 am
You can try RESTORE VERIFYONLY. If the backup was done with the CheckSum option and all the database pages had checksums, then if this returns successful the backup will very likely restore. If the backup was not done with the checksum option then this will just check the validity of some of the headers.
Only way to be 100% sure that a backup will restore is to restore it.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 2, 2009 at 9:45 am
Testing by doing an actual restore, including transaction logs, will be more beneficial because it will make sure you know the actual steps .... you'll be more prepared in case of an emergency.
November 2, 2009 at 9:48 am
Can I ask why you cannot restore it if you want to test it?
Gail's advice about "Verify Only" is good and that is reliable the vast majority of the time, but just as she said, the only way to be 100% certain is to actually restore it somewhere. Perhaps if we know why you can't restore it we can help you figure out a way around that instead of settling for lesser options.
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply