spid

  • how to findout the what command excuted by perticular spid?

  • charipg (9/7/2009)


    how to findout the what command excuted by perticular spid?

    dbcc inputbuffer(Spid_Number)

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • thanks........

    i am not getting complete command from dbcc inputbuffer.

  • for example a update command(update table set id=1) excuted by perticular spid,how to get that command.

  • dbcc inputbuffer shows only first 256 signs of the query, you can see whole query using following code:

    select t1.session_id, t2.text from sys.dm_exec_requests t1 cross apply sys.dm_exec_sql_text(sql_handle) t2

    where t1.session_id =

  • thanks a lot.............

  • Hi marcin gol,

    can u pls provide the same query for sql2000.

    thanks in advance.

Viewing 7 posts - 1 through 6 (of 6 total)

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