Posts

Showing posts with the label ghost record

SQL server, How to recover just deleted data (...ops i did it again!)

Image
Hi Guys, Since the previous post received a lot of reviews, today we continue with the series " omg I deleted the wrong record! " Then let us immerse ourselves in the dense atmosphere of a server room. This time you have dared too much. You didn't do your nice "begin tran" command before doing that damn delete .. and you deleted the wrong row . In the previous post we saw that we can recover the data. But if you have just made the cancellation, do you have any more hope of recovering the data on the fly?   Enjoy the reading!   Deleted data or Ghost record? The first important fact is that records are not physically deleted when you execute a delete . In fact, for performance reasons when deleting data SQL Server only marks the data as ghost record . Therefore, the deleted row stays on the database. In the row header it will be written that that the row is now a ghost row. ...and if you think about it, this is a very useful mechanism because it prevents us fr...