[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-03-27
6
Medium Priority
?
586 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 600 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 1400 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

830 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