We help IT Professionals succeed at work.

How to view Trigger in Profiler

dba123
dba123 asked
on
Medium Priority
2,197 Views
Last Modified: 2008-02-01
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?
Comment
Watch Question

Commented:
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,

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Top Expert 2006
Commented:
follow these steps
=============
1. In new trace connect to server
2.In Trace properties inside profiler
3.Click on event Selection
4.Check  Show All Events (to view all the events)
5.Enable Sp_StmtStarting, Sp_StmtCompleted check box

Let us know if you need furter assistance.

Commented:
thank you for agreeing with me imran_fast.
Top Expert 2006

Commented:
sorry didn't read your post carefully.

Commented:
dba123, does this answer your question? if no, please let know.

Author

Commented:
well that's stupid that you can't see the name of the trigger...what a joke MS.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.