solving sql server problems for millions of dbas and developers since 2006



SQL Server DBA Tips SQL Server Developer Tips SQL Server Business Intelligence Tips SQL Server Career Tips SQL Server Whitepapers SQL Server Tools SQL Server Webcasts SQL Server Questions and Answers SQL Server Questions and Answers













roll back

Asked 2/15/2012 9:14:58 PM by amir younas

Dear sir,

              i issue delete commond on a table without where condition and all my data has been deleted. is there any way to bring back my data.

 

thanks,

amir



Answered 2/16/2012 8:26:49 AM by Scott C (1) vote answer is useful vote answer is NOT useful

Unless you ran the DELETE inside a transaction, allowing a ROLLBACK statement to undo the action, it will not be easy.

The next best method would be to restore a copy of the database from backup, and reload the table with an INSERT/SELECT statement.  If the database is in full recovery mode you should be able to restore it to a point in time just before the DELETE was run.

If you don't have usable backups, you might be able to use third-party log reading tool.  I am not sure how optimistic to be, because if your database is not in FULL RECOVERY mode the logs may already have been overwritten.  If the database is in FULL RECOVERY mode, why wouldn't you have usable backups?


Answered 2/18/2012 6:50:36 AM by Jeremy Kadlec (0) vote answer is useful vote answer is NOT useful

+1 to Scott C's response.

The only other hope you could have is having the data on a reporting system that you could access from the previous day.

Are you using Windows Volume Shadow Copy?  If so, you might have another form of a backup.

As a final option, if the data is on a SAN then I would also check to see if some sort of volume shadow copy technology is in use to see if you can access the data at a point in time earlier in the day.  This is similar to the previous option.

In terms of prevention, be sure to review your overall security to prevent an issue like this from occurring in the future.

Thank you,
Jeremy Kadlec



Post an Answer

Keep it clean and stay on the subject or we may delete your comment.
Your email address is not published. Required fields are marked with an asterisk (*)

*Name   *Email   Notify for updates
Comments
*Enter Code refresh code


 
Sponsor Information
"SQL doctor ROCKS! As soon as I ran it, problems that have been giving me headaches were identified and cured."

SQL Monitor – For database professionals who need results on Day One. Try it online.

SQL Servers keeping you up at night? Contact the Edgewood SQL Server DBAs for a Health Check. Prices start at $995.

Find and Fix SQL issues with Foglight Performance Analysis. Get a free copy.

Join the over million SQL Server Professionals who get their issues resolved daily.

Demystify TempDB Performance and Manageability


Copyright (c) 2006-2012 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | user groups
Some names and products listed are the registered trademarks of their respective owners.


Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com