Finding SQL in data dictionary

  • Hi everyone,

    Does anyone have a query that I can use to see what sql statement is being run by a PID? Thanks in advance.

  • Hi,

    You could use: DBCC INPUTBUFFER(pid),

    Ok, will only get first 255 chars of the statement...

    /rockmoose


    You must unlearn what You have learnt

  • Thank you rock, I was hoping to get the whole statement.  But this will do half the job

  • Yup,

    If you come across a better solution please notify me

    Profiler is a great help when monitoring the sql sent to the server, but yopu can't get it running "before the fact" alas. And sometimes you want to know what is happening at the current moment in the server....

    /rockmoose


    You must unlearn what You have learnt

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

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