How To Verify or Test If a Trigger was fired in SQL Server

sql-server, triggers

Solution

No, there is no such thing that I know of.

To test if a trigger fires you can add a PRINT statement to the trigger (e.g. "PRINT 'trigger fired!'"), then do something that should trigger the trigger. If you get the printed text in your messages-tab in management studio you know it fired.

Problem

We have a trigger in SQL Server that is supposed to be fired on DML SQL queries i.e. when a value for column in a table is updated. Is there a way to verify that the trigger was actually fired ? I am looking for a SQL query or a log file that keeps record of any triggers that were fired. Thanks

Original source