Solved

how 2 restore  a table from the database snapshot?

Posted on 2010-08-26
5
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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