Search code examples
sql-serversql-server-profiler

SQL Server Profile - View Parameter Values?


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?


Solution

  • 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'