|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 5:02 AM
Points: 403,
Visits: 904
|
|
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...
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 8:19 AM
Points: 189,
Visits: 863
|
|
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.
|
|
|
|