Solved

how 2 restore  a table from the database snapshot?

Posted on 2010-08-26
5
249 Views
Last Modified: 2012-06-27
Hi All,
I have a database n I dropped a table in that.
I have a old snapshot available before this drop table happened.
How to just restore that table from the snapshot instead of resorting the entire database from the full backup I have?
0
Comment
Question by:saratcm
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:vdr1620
ID: 33533886
Restore the Database with a different name on the server..Copy the table to your database and Drop the Newly created database
0
 

Author Comment

by:saratcm
ID: 33534065
Hi vdr,
Thanks for the comment,
U mean create a new database with the snapshot I have n copy table from that database?
Is there a way to copy table directly from that snapshot I have instead of restoring it on a new database n copying from that database?

0
 
LVL 16

Assisted Solution

by:vdr1620
vdr1620 earned 200 total points
ID: 33534412
My bad ..Ignore the previous post..

you can directly do an insert Like below

INSERT INTO [Database].[Schema].[table]
 SELECT * from [snapshot_Database].[Schema].[table]


http://blog.sqlauthority.com/2010/04/05/sql-server-2008-introduction-to-snapshot-database-restore-from-snapshot/
0
 
LVL 14

Accepted Solution

by:
wolfman007 earned 300 total points
ID: 33540027
In SQL Server Management Studio browse the Database Snapshot, right click on the table you want to recover and select

Script Table As > Create To > File

Save the script file with a meaningful name.

You now have a t-sql script to recreate your dropped table.

Run the create table script against your live database to recreate your dropped table.

Then import the data from the snapshot into the recreated table using the SQL above i.e.

INSERT INTO [Database].[Schema].[table]
 SELECT * from [snapshot_Database].[Schema].[table]
0
 

Author Closing Comment

by:saratcm
ID: 33560950
Thanks 2 both
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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