Recovering a truncated table on a SQL Server
How can I recover a truncated table on a SQL Server?

Software/Hardware used:
ASKED: January 21, 2009  5:47 PM
UPDATED: June 25, 2012  10:50 PM

Answer Wiki:
I do not think you can unless you have a good backup of that table. Once you execute a truncate then the server has no log of that event. All of that data is gone. Sorry and I hope that you have a good backup in order to restore from. Truncate is a logged event. All statements which change data within the database are logged. If it wasn't logged in wouldn't pass the ACID test. Please stop telling people that truncate isn't logged. The truncate statement is minimally logged. This means that instead of logging that each row in the table was deleted, a mark is put into the log saying that all records in the table were deleted. In order to restore you will need to restore your database and store the restore at the point when the truncate statement was run. If you do not have log backups restore your most recent full, and differential (if you have diffs). That'll be as good as it gets.
Last Wiki Answer Submitted:  January 22, 2009  1:58 am  by  Colin Smith   845 pts.
All Answer Wiki Contributors:  Colin Smith   845 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I apologize for my phrasing. Mr. Denny is of course correct in saying that it is a minimally logged event. That being said the outcome is the same. Since the event is minimally logged you can not rollback the truncate action. Restore is your only option. Thanks for the correction Mr. Denny.

 0 pts.

 

You may repair sql server truncated table with the aid of utility below http://www.sql.repairtoolbox.com it must aid you

 10 pts.