Hi Id like to map the calling stack from one master stored procedure through its hundreds of siblings. i can see it in the dialog, but cannot copy or print it, but couldnt trap anythiing worthwhile in proflier. do you know what sproc fills that treeview? i must be a recursive CTE that reads syscomments or information_schema.routines, but its beyond my chops, though i can imagine it thanks in advance drew
views:
142answers:
2
A:
you might want to look at the source code for sp_depends (Transact-SQL).
In SQL Server Management Studio:
go to the "master" database
and then "Programmability"
then "Stored Procedures"
then "System Stored Procedures"
then "sys.sp_depends"
In sp_depends's code, there are queries on the tables you'd need to hit to build output like you are after.
KM
2010-04-21 14:03:07