A SQL Server Table Restore

Posted: July 31, 2008 in Database Recovery, SQL Server 2008

A quick little note or maybe a tip today; I ran into a situation where I a friend of mine had lost some tables in her database. However the tables that she lost were not very well known tables. It was a 3rd party database that has 50 tables where they really could have used 10. When they tried to use the application they were getting object does not exist errors, like you would expect. There was some information in the other tables in her database that she need to keep some transactions that had completed and orders that needed to be filled. End result was that a full database restore with T-Logs might lose some of the order data.

We took a little gamble on this one, since we did not know what was in the tables and we really had not talked about them at all we decided to do a partial restore. We restored the database to the same server but to a database name. Counted the objects where the object types were tables and found that there were really two tables that were lost. We did not know about the second one because the first one had raised the error before the code reached the point where it accessed the second table.

We checked on the counts on the two missing tables in the restored database and the counts were zero. So we moved the tables back over into production and got the system back up and running. I am sure that many of us have used this before; But since SQL Server 2005 or 2000 does not allow single object restores that maybe this tip could help some.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s