I recently learned that SET STATISTICS IO ON shows what tables get referenced and a lot of useful information. Currently, I'm debugging a stored procedure that branches out and calls a bunch of other stored procedures during the process.
So, my question is: Is there a mechanism similar to STATISTICS IO, which prints out the tables used, that prints out which stored procedures get executed? If so, what is it?
答案 0 :(得分:3)
It sounds like you simply want to show dependencies where the object type is a Stored Procedure.
答案 1 :(得分:2)
If you open up SQL Server Profiler, and run the Stored Procedure, you can get a trace of the nested SP calls. If you've not used it before, do check it out.