SQL Profiler: How do I see the value of a parameter?

  • When using SQL Profiler, I would like to be able to view the value of the parameter passed into a stored procedure.

    For example,

    Delcare @MyValue Int

    SET @MyValue = 10

    Exec spShowValue @MyValue

    In SQL Profiler, how can I see the value of @MyValue.

    My Environment: SQL Server 2008

    Thanks.

    Steve

  • It'll likely be in a previously recorded event from the same SPID.

    K. Brian Kelley
    @kbriankelley

  • Most of the time, when I'm observing client statements in trace events, I see the parameter values on stored procedure calls. And if I run a batch that looks like what you posted, I see the whole batch in the textdata column.

    It must matter how the procedure is called.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply