question

nidheesh.r.pillai avatar image
nidheesh.r.pillai asked

Tracking a Scenario - SQL Triggers!

Hello folks, Can anyone help me with this scenario? "I am facing a scenario here where during some debugging exercises, we had turned off the update trigger on on of my tables. Soon after the exercise, we left for the day, while forgetting to restore the triggers back. After a week, we realise our folly and are now wanting to analyse what all transactions could have occured in the meantime and apply them to the trigger tables and take the database into a single-truth version. Any ideas how we can accomplish? My rig is having SQL Server 2008R2"
triggers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Grant Fritchey avatar image
Grant Fritchey answered
You are out of luck. There is no automatic mechanism that captures this within SQL Server unless you've set it up. You could use [Extended Events][1] (the best mechanism) or a lot of people are still using Profiler. But both of these require that you have defined and enabled their event capture. There is no way in the world to go back in time and capture this information. Unless... Do you have your database in full recovery mode and do you have all the log backups for the period you're interested in? If so, you could, through a very long, tedious, extended process, carefully browse through the [transaction logs using fn_dblog][2]. It will not be easy. [1]: http://blogs.msdn.com/b/extended_events/ [2]: http://www.sqlservercentral.com/articles/Transaction+Logs/71415/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.