SQL Server Profile - View Parameter Values?

Tyllyn picture Tyllyn · Dec 10, 2008 · Viewed 18.5k times · Source

In SQL Server Profile, I have it tracing SP:StmtStarting events. The "TextData" includes information like the following:

EXEC MySortedProc 
   @param, NULL,
   @param2, NULL

What would I have to trace (or can I?) to view the value of those parameters?

Answer

Tone picture Tone · Jun 25, 2009

Somewhat scared to have misunderstood the question, but you could profile on the RPC:Completed event which will return the result for stored procedure execution in the textdata column like:

exec usp_yourproc @param = 'value'