如何查找最近作用于某个表的 sql 更新操作 (SQL Server 2005) [英] How to find recent sql update operations acting upon a certain table (SQL Server 2005)
本文介绍了如何查找最近作用于某个表的 sql 更新操作 (SQL Server 2005)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我想在 XX 表中找到最新添加的行(任何用户的 UPDATE,不一定是执行 UPDATE 的行).
say I want to find the latest added rows (UPDATE by any user, not necessarily the one which is executing UPDATE) in XX table.
推荐答案
您需要使用事务日志阅读器工具.有几个免费产品和商业产品.
You would need to use a Transaction Log reader tool. There are several free ones available as well as commercial offerings.
您也可以尝试这个未公开的命令:
You could also try this undocumented command:
DBCC LOG(<database name>[,{0|1|2|3|4}]).
如果您使用的是 SQL Server 2000,RedGate 有一个免费工具 SQL 日志救援.
If you're using SQL Server 2000, RedGate have a free tool called SQL Log Rescue.
Documentation for DBC LOG: (1) (2)
这篇关于如何查找最近作用于某个表的 sql 更新操作 (SQL Server 2005)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文