Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    47

    Unanswered: connexion, processes ...

    From the system table sysprocesses, how to do in order to extract
    the SQL command related to the processes ?

    What are system views/tables, scripts used to monitor and obtain more information
    about processes, connexions... ?

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Straight from the Holy Book (SQL books Online)
    ------------------------------------------------------------------------
    DECLARE @Handle binary(20)
    SELECT @Handle = sql_handle FROM sysprocesses WHERE spid = 52
    SELECT * FROM ::fn_get_sql(@Handle)

    ------------------------------------------------------------------------
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Oct 2003
    Posts
    47
    Thanks for the reply, but the code is not working in my server (and mya be this is due to SP...). By the way, how to find the last SP applied to sql server ?



    DBCC INPUTBUFFER(80)
    EventType Parameters EventInfo
    --------- ---------- ----------------------------
    RPC Event 0 DVSPAYS_CODELIB_DVSPRINC_S;1


    DECLARE @Handle binary(20)
    SELECT @Handle = sql_handle FROM sysprocesses WHERE spid = 80
    SELECT * FROM ::fn_get_sql(@Handle)
    dbid objectid number encrypted text
    ------ ----------- ------ --------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    No row(s)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •