How to get SQL Profiler to monitor trigger execution

Sql ServerSql Server-2005Sql Server-Profiler

Sql Server Problem Overview


I have a trace setup for SQL Server Profiler to monitor SQL that is executed on a database. I recently discovered that trigger execution is not included in the trace. After looking through available events for a trace, I do not see any that look like they would include trigger execution. Does anyone know how to setup a trace to monitor the execution of triggers?

Sql Server Solutions


Solution 1 - Sql Server

Stored procedures:

  • SP:StmtStarting
  • SP:StmtCompleted

Solution 2 - Sql Server

In SQL Server Profiler 2008, when starting/configuring the trace, go to the "Events Selection" tab, click on the "Show all events" checkbox, and then in the list under the Stored Procedures section select the SP:StmtStarting and SP:StmtCompleted events to be included in the trace.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfiredflyView Question on Stackoverflow
Solution 1 - Sql ServerMladenView Answer on Stackoverflow
Solution 2 - Sql ServerLachlan WetherallView Answer on Stackoverflow