Solved

Restoring only one table in database backup

Posted on 2009-05-04
5
1,550 Views
Last Modified: 2012-05-06
An issue has come up some missing data in a table in one of my MS SQL 2005 databases.  There are a few dozen tables, all actively being used and updated regularly.

What I need to do is to recover ONLY THIS TABLE to look at this data for evaluation.  I have seen lots of directions about restoring databases, but haven't seen how to only recover only one table.  It would make sense to not overwrite the existing data that has accrued over the last few weeks, but it's not a big deal because I've made copies of this table.

If this doesn't work, how hard is it to create a new database on a different server and restore my backup there to see what it looks like?  From there I suppose I could insert any missing data into the live table.  Thanks for any input.
0
Comment
Question by:IntercareSupport
5 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 250 total points
ID: 24298273
you can't recover just that single table w/o restoring the whole db if you havne't planned for it. (filegroups).  SO, restore the backup to a new database, and then just move that table data over to your existing db.  
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
ID: 24298276
unless the table is on a dedicated tablespace, you have to restore the entire database (under another name, no problem to be done even on the same server).
after that, you can copy back the table with or without data just as needed.
0
 

Author Closing Comment

by:IntercareSupport
ID: 31577707
Thanks, that's what it was looking like to me, too.  Appreciate it.
0
 
LVL 1

Expert Comment

by:usmanr
ID: 24298555
yes you cannot restore single table from backup file.

For data comparison, Though you can write queries to compare data between databases on different servers but to make things easier, Instead of restoring the database on different server, you can restore it on the same server with different database name. Then if you want to compare the data between tables, you can write some query for this.
To make your query more simpler, you can use DTS (Data Transformation Services) / Sql Queries to copy the table into same database.
0
 

Author Comment

by:IntercareSupport
ID: 24298702
Thanks, good advice.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question