Prepared Statements

  • Hi,

    Apart from running SQL profile continually is there any way to find the SQL associated to a prepared statement.

    Also when the prepared statement is executed at run time with sp_execute, DBCC INPUTBUFFER ( spid )  just returns

     sp_execute;1

    without the parameters. How can the parameters be found ? 

     

  • This was removed by the editor as SPAM

  • Just in case anyone needs the answer, the trick is to add the EventClass Event to SQL profile , and filter on the following Events:

    RPC:Completed

    SP:StmtCompleted

    and you will see the raw SQL

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

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