Profiler Trace - help required identify code

  • I have a profiler trace running which is collecting events running over a specified duration.

    appearing in this trace is an EventClass = 'RPC:Completed' and the textdata = 'sp_execute 42,param,param,param'

    Is there anyway to relate the 42 back to the script that is actually executing.

    many thanks in advance.

    Ian

  • Saw this a few years ago, do you have an app coded in delphi connecting to the server? If so It does a prepare statement then runs the code. From what I can remember you need to include other events to capture the prepared statement event.

    MCITP SQL 2005, MCSA SQL 2012

  • RTaylor2208 (7/14/2011)


    do you have an app coded in delphi connecting to the server? .

    Yes it is a Delphi app that is connecting.

    I think the offending code was prep'ed before my trace started, but it is being reused,

    I was hoping to find a way to locate the plan or the text on the server.

    -- edit--

    SELECT [sql] FROM sys.syscacheobjects

    WHERE cacheobjtype = 'Compiled Plan'

    looks like it might be a step in the right direction, but I cannot match the compiled plans back to this sp_execute 42

    any ideas would be gratefully recieved.

  • I'm pretty sure you need to capture it as part of the trace as the 42 is just an internal number used as a pointer to the SQL.

    Sorry its been years since I last looked at delphi and how it connects with SQL Server.

    MCITP SQL 2005, MCSA SQL 2012

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

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