开发者

can i restore the previous value of a cell of a row in SQL server 2008?

I have made a wrong entry in a cell and committed it. Later i found that that entry was actually suppose to be done to the below row cel开发者_如何学Cl, but i dont remember the previous value and want to know that can i still find it anywhere to make the correction.


The backup is the best way to approach this, if the database is in properly full logged mode and the transaction is still in the transaction log, it can be pulled out and decoded manually, although the effort to do this is non-trivial.

I've written an example of doing this for an update. http://sqlfascination.com/2010/02/03/how-do-you-decode-a-simple-entry-in-the-transaction-log-part-1/

This really though is not a mechanism you should ever rely on to recover data, suitable backups / transactions or even paper backups would be better.


Only real way that i can think of would be by restoring a backup and using the value of that row from the backup.

Note: Retaining the references to transaction log restore method using SQL log rescue in case someone with SQL 2000 ever runs into a similar issue


I can add to all these goood answers that also SQL Litespeed tool has a very nice feature called Log Reader which can help you restore past values from Log backups (done with Litespeed) and even Online Transaction log (not backed up). I think a trial version of Litespeed will let you look into your online transaction log file - of course if your database is in Full recovery mode. Worth to try.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜