SQL Newbie - testing integrity of a database restore
Posted on 2005-05-11
Is it possible to list the number of items in a table in a SQL query? I am testing backup/restore in a test environment so I don't have an application server to read from the SQL databases so I was hoping to run a simple-ish SQL query that will read through the database tables and come up with a total number of records (or something like that). Hopefully that total before and after a restore should be the same...
Alternatively, is there a good integrity test and/or read test that I could run against the databases to prove the restore is good?
Problem is, my knowledge of SQL language is now 12 years old and very, very rusty. Creaky even. And I'm new to SQL 2000.