say I want to find the latest added rows (UPDATE by any user, not necessarily the one which is executing UPDATE) in XX table.
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
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:
If you're using SQL Server 2000, RedGate have a free tool called SQL Log Rescue.
EDIT: Documentation for DBC LOG: (1) (2)
Please refer to SQL Docs & look for OUTPUT clause (that you can use with UPDATE/INSERT to get the affected records).
http://msdn.microsoft.com/en-us/library/ms177564.aspx
SQL Server Profiler will allow you to track hits to the database in real time. You can set filters on a number of properties to ge the output you need.