How to get SQL Profiler to monitor trigger execution
Asked Answered
D

2

68

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?

Dorie answered 1/10, 2008 at 20:23 Comment(0)
A
76

Stored procedures: - SP:StmtStarting - SP:StmtCompleted

Addieaddiego answered 2/10, 2008 at 9:45 Comment(2)
I don't think this event type is specifically for Triggers, in fact when using it in practice it seems to Start and Complete on every single line of codeGould
It's not specific to triggers, but it is how to setup a trace to monitor the execution of triggers, which answers the questionMaxia
D
54

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.

Day answered 25/5, 2010 at 2:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.