Create Trigger to log SQL that affected table?
I'm trying to find out what is updating the value of a column and i have very little knowledge of the application. At a quick glance I've noticed about 90% of the applications business logic is handled on the database. Needless to say the depth of SP's, functions, and triggers is crazy. I'd like to create a trigger on the table in question that will log the SQL that affected the table. What SQL could be used to grab the executed SQL in the context of the table being updated? Details: MS SQL Server 2008 Thanks!! I realise this issue has already been resolved but I was interested in how it could