Nested Triggers

  • Hi,

    Is there any easy way of determining nested triggers?!

    For example, if I update a table that has an update trigger and that triggers call and SP the does an insert on another table that has a trigger, is there a way of getting this dependencies?!

    Thanks,

    Pedro



    If you need to work better, try working less...

  • Pedro,

    One place to look is the sp_depends procedure.

    To use, just call it and give the object name. This is an example for a trigger. (You can look it up in BOL for specifics and other parameters to use.)

    EXEC sp_depends @objname = N'AdventureWorks.Production.iWorkOrder' ;

    You will have to call it for each object that shows up if you want to follow the trail.

    In SSMS, you can right click a table, SPROC, etc. and choose View Dependencies. This gives a hierarchical view of the dependencies.

    Hope this gets you started.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply