Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to capture procedure values for nested SPs

Author  Topic 

denis_the_thief
Aged Yak Warrior

596 Posts

Posted - 2013-07-29 : 09:59:51
Any ideas on how to capture parameter values passed internally for nested stored procedures? Profiler is not capturing the parameters for internal calls.

I realize with this event, we can see the parameter values in profilier: RPC:Completed. But that is only helpful for the outer call, with these events: SP:stmtstarting and SQL:stmtstarting, Profiler will list the nested SP call but will not show me the parameter VALUES (instead I get stuff like Exec SP1 @p1, @p2...)

I suppose I could add a print statement or log statement in every stored proc, but there are so many involved and so many parameters so would be very difficult. Even if there was some way of, inside an sp, to capture the full call including all its parameters?

Thanks.
   

- Advertisement -