[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how 2 restore  a table from the database snapshot?

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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

656 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