How to get parameters passed to an in progress stored procedure?

  • Have many stored procedures.

    Server is way to busy to run trace or profiler on the production server.

    When they run in real-time want to get the parameters passed to an in progress stored procedure.

    Is there a msdb view that can queried to obtain the parameters for an in progress stored procedure?

  • No. There isn't any view that you can query to tell you what parameters where passed in.

  • If your stored procedures were written to log this information prior to doing any actual work, then you would have a method to see this, but that sounds like a lot of extra work.

  • If your server is so busy that a well-structured server-side trace will bring it down, you have some serious issues. While extended events (introduced in SQL Server 2008) are much more lightweight, the trace events are extremely cost effective. That's what I'd use, and have used, on a 2005 & earlier system.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 4 posts - 1 through 4 (of 4 total)

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