February 13, 2009 at 2:35 pm
I am looking for some simple sql statements that would help me verify that a database was restored? For example, if I restore the pubs database are there scripts I can run which would list the user tables in the pubs database, count the user tables and system tables, count other objects (views, sps, etc.). I would like to run these scripts before the restore and then after the restore just to verify my objects are the same.
Thanks in advance, Kevin
February 15, 2009 at 11:49 am
Try the system table, sysobjects.
February 23, 2009 at 12:58 pm
I would almost consider this a waste of time. The restore will restore what's in the backup. If you are worried about your backup not containing the right objects, that won't happen if it's the correct backup.
If you're worried about changes made after the backup that are lost, you need a good scheme to regularly run and get a list of objects.
INFORMATION_SCHEMA views will help.
March 16, 2009 at 7:27 am
Simply checkmarking the verify checkbox on a backup will do what you want as well.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply