How to find recent sql update operations affecting a specific table (SQL Server 2005)
say I want to find the last added rows (UPDATE by any user, not necessarily the one doing the UPDATE) in table XX.
0
Flair
source
to share
3 answers
You will need a transaction log reader. There are several free as well as commercial offers.
- ApexSQL Log
You can also try this undocumented command:
DBCC LOG(<database name>[,{0|1|2|3|4}]).
If you are using SQL Server 2000, RedGate has a free tool called SQL Log Rescue .
EDIT: Documentation for DBC LOG: (1) (2)
+2
Mitch wheat
source
to share
Refer to the SQL docs and find the OUTPUT clause (which you can use with UPDATE / INSERT to get the affected records).
http://msdn.microsoft.com/en-us/library/ms177564.aspx
0
shahkalpesh
source
to share
SQL Server Profiler will allow you to track database accesses in real time. You can set filters on a number of properties to get the result you want.
0
TGnat
source
to share