SQL Server Profiler and Prepared Queries

  • I am trying to figure out how to detect issues with queries via SQL Server

    Profiler and trace files. Because of the way we utilize JDBC with our

    application, most of our queries appear in the trace files as prepared

    statements. My understanding is that when the statement is “prepared” it is

    assigned a handle. And the later this handle is used in sp_execute statement.

    If I am incorrect please let me know.

    My question is, how do tie the sp_execute statement back to the corresponding

    prepare statment in order to figure out which query is being executed?

    Thanks,

    Mark

  • you should add "statement:completed" to see the text in the trace.


    * Noel

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

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