Solved

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

Posted on 2004-03-27
6
577 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Suggested Solutions

Title # Comments Views Activity
MS SQL Update query with connected table data 3 38
Powershell v3 - SQLCMD 3 27
backup and restore 21 30
MS SQL AND PASSING A TABLE NAME TO A SPROC 5 18
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

829 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