开发者

Find previous value of a DB record from transaction logs?

Trying to track down a bug in an application, but need to confirm whether a column value was changed on a particular reco开发者_运维知识库rd in SQL 2005.

How can I query the transaction logs for the record's previous column values?


Agreed it won't be easy. You can also investigate fn_dblogas in this post Decoding a Simple Update Statement Within the Transaction Log


Transaction logs aren't typically supposed to be directly queryable, but for exceptional circumstances, you can use the DBCC LOG command to get information from the transaction log. The output isn't exactly straightforward, and it would be a difficult task to determine whether a given column value was changed.

If you know the date of the change, it would probably be simpler to restore a copy of the database before and after the change to verify that the change was made.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜