?
Solved

how 2 restore  a table from the database snapshot?

Posted on 2010-08-26
5
Medium Priority
?
257 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 800 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 1200 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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

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…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

862 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