Solved

How do I Restore Rows from SQL Server Tables that I deleted?

Posted on 2004-03-27
6
574 Views
Last Modified: 2010-08-05
I accidently deleted rows from several SQL Server tables.  How do I restore those rows?  I have admin. privs on the DB server.  This is SQL Server running on a Win2000 server machine.  This is very urgent!!!!! i need this data back ASAP.  Any help would be greatly appreciated.!!!! thanks David
0
Comment
Question by:david_kelly
6 Comments
 
LVL 50

Assisted Solution

by:Lowfatspread
Lowfatspread earned 150 total points
ID: 10697583
do you have a backup of the database from a point in time where the rows would be present?

if so restore that as a new database

and retrieve the rows from there


good luck...
0
 
LVL 3

Expert Comment

by:edwardsearch
ID: 10698529
hi  Lowfatspread

 Is there any chances that we can rollack our transaction from a particular point(say in anotherwords we have deleted records in a comitted transaction and in the next transaction we wants to retrive it. Is there any way to apply this ?

For Example In Visual FoxPro u can delete records and recall it until u are apply the pack command. Is there any privilege like that in SQL Server

0
 
LVL 34

Accepted Solution

by:
arbert earned 350 total points
ID: 10698939
If the recover mode on the database is set to full, you can perform a full backup (with transaction log) and turn around and restore the backup your just made but do a point in time restore stopping at the time you did the delete....

Search in books online for point-in-time.

Most people don't realize they can backup AFTER the delete (if recovery mode is full) and still do a point in time restore....

Brett
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 3

Expert Comment

by:ctcampbell
ID: 10722597
edwardsearch, since Visual FoxPro stores its data in a flat file format, it would be ineffecient to rewrite the whole file every time you delete a record.  So it just marks the record as deleted until you pack it.  SQL Server, OTOH, very effeciently uses b-tree index pages (or heaps on tablea with no clustered indexes) and reclaims the space for re-use as soon as the record is deleted.

If you don't have one already, it's time to work on your backup procedures and disaster recovery plan.


BTW, That's cool, arbert.  I never thought about that.  I hope I can whip that one out sometime to the oohs and ahs of management types.
0
 
LVL 34

Expert Comment

by:arbert
ID: 10729750
"BTW, That's cool, arbert.  I never thought about that.  I hope I can whip that one out sometime to the oohs and ahs of management types."

It happened to be on the top of my mind because I just had to do it for a user the other day :)  Something you really don't think about too much until your butt's on the line :)
0
 
LVL 3

Expert Comment

by:edwardsearch
ID: 10820167
Thanks  Brett and ctcampbell. Both informations are really usefull.

- Edward
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

746 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

16 Experts available now in Live!

Get 1:1 Help Now