Question : How to view Trigger in Profiler

I'm trying to figure out why I can't see my trigger fire off in SQL 2005 Profiler.  Which propety should I enable the trace to monitor in order to see any triggers that have been fired on my tables?

Answer : How to view Trigger in Profiler

Erm, not sure if this is what you are after. For DML triggers,

Knowing Triggers are really stored procedure under a disguise, using SQL Server Profiler, create new trace and trace on stored procedure such as STMTSTARTING.

For example if I have a DML trigger on Table_1,

ALTER TRIGGER [testDMLTrig]      
ON [dbo].[Table_1]
AFTER INSERT, UPDATE
AS RAISERROR ('Notify Customer Relations', 16, 10)

In the profiler, you would see "RAISERROR('....)" in STMTSTARTING and STMTCOMPLETED lines.

Unfortunately I don't see where in SQL Profiler allows you to see the name of the trigger though. Any experts out there that know otherwise?

Now of course the other very premitive way, is you can always insert a record into another user defined table whenever a specific trigger that you are trying to monitor get fired off.


Regards,
Random Solutions  
 
programming4us programming4us