To capture the return value of SP, we need to enable RPC Output Parameter event.
1) Run Profiler.exe
2) Connect to SQL Server
3) In Trace Properties dialog, select TSQL_Replay template (or other appropriate for your purpose) in [Use this template].
4) Goto [Event Selection] tabe
5) Make sure [RPC Output Parameter] is selected.
6) Start trace.
The result of OUTPUT parameter will be shown in RPC:Completed event. When the row for RPC:Completed is selected in trace, the bottom pane show TextData and you will see output parameter value before SP call. In the example below, output @p3 is set to 562.
No comments:
Post a Comment