How to view Trigger in Profiler

Posted on 2006-04-04
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?
Question by:dba123
    LVL 3

    Accepted Solution

    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]
    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.

    LVL 28

    Assisted Solution

    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.
    LVL 3

    Expert Comment

    thank you for agreeing with me imran_fast.
    LVL 28

    Expert Comment

    sorry didn't read your post carefully.
    LVL 3

    Expert Comment

    dba123, does this answer your question? if no, please let know.
    LVL 1

    Author Comment

    well that's stupid that you can't see the name of the trigger...what a joke MS.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now