Solved

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

Posted on 2004-03-27
6
576 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

786 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