Solved

how 2 restore  a table from the database snapshot?

Posted on 2010-08-26
5
240 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks 2 both
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now