Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to get transaction list against a table?

Author  Topic 

raysefo
Constraint Violating Yak Guru

260 Posts

Posted - 2010-12-14 : 12:22:29
Hi,

I wonder if there is a way to get the list of transactions (insert, update, delete etc) against a table in a DB?

Lets say i want to know what kind of transactions proceeded on table ABC during last 3 days?

thanks in advance.

Best Regards.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-14 : 12:56:43
You could log it via DML triggers. If you are using SQL Server 2008, then you can use the Change Data Capture feature to track data changes.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

raysefo
Constraint Violating Yak Guru

260 Posts

Posted - 2010-12-14 : 13:04:02
We are using SQL Server 2008 and we did NOT track data changes.So noway for me to get which operations has done to a table?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-14 : 13:05:36
There are third party tools (not free) which allow you to read the transaction log. If you've got regular tlog backups, then you can go down that route.

There are undocumented commands to read the current transaction log as well as tlog backups, however it isn't something an average or even a senior person can do. It's truly on the expert level.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -