Solved

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

Posted on 2004-03-27
6
580 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
[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
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

690 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