在更新语句后查看更改的值 [英] view the changed values after an update statement

查看:105
本文介绍了在更新语句后查看更改的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道更新命令发生后是否可以查看表上的更改?

just wondering if it is possible to view the changes of an update command on a table after it has happened?

交易日志会存储此类信息吗,即这是先前/当前值,这是新/更改后的值

would the transaction log store this kind of information i.e this is the previous/current value this is the new/changed value

不确定是否可行.服务器是ms sql 2008

not sure if this is possible. the server is ms sql 2008

推荐答案

事务日志中确实包含信息,尽管对其进行解码并不容易-我写了一篇博客文章,其中包含对事务日志中的简单更新语句进行解码的示例- http://sqlfascination .com/2010/02/21/decoding-a-simple-update-statement-in-the-transaction-log/

The transaction log does contain the information, although decoding it is not trivial - I wrote a blog post with an example of decoding a simple update statement in the transaction log - http://sqlfascination.com/2010/02/21/decoding-a-simple-update-statement-within-the-transaction-log/

但是,根据正在执行的更新,日志中的条目会变得更加复杂,并且没有有关如何对其进行解码的文档.对它们进行逆向工程非常困难.

However, depending on the update being performed the entries in the log get a lot more complex and there is no documentation available on how to decode them. Reverse engineering them is quite difficult.

我永远不建议使用这种检查日志的技术来检索数据,仅从内部学习/法医的角度来研究它是值得的.

I would never recommend that this technique of inspecting the log is used to retrieve data, it is only worth looking into from an internals learning perspective / forensic perspective.

这篇关于在更新语句后查看更改的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆