A simple SysProcesses query.

  • A quick and simple SysProcess query which will display most of the common parameters of interest. Can be useful for a quick reference. [Not disputing the fact of SP_WHO and SP_WHO2 and SP_WHO3 ... et al]

    USE MASTER

    --

    SELECT SPID,KPID, '[' + CAST(DBID AS VARCHAR(10)) + '] ' + DB_NAME(DBID) DBNAME, PROGRAM_NAME, HOSTNAME, CMD, OPEN_TRAN, LASTWAITTYPE, CPU, PHYSICAL_IO, STATUS, LOGINAME, NT_USERNAME, NT_DOMAIN

    FROM MASTER..SYSPROCESSES

    WHERE SPID > 50

    🙂

    Mehernosh.

  • Tried it using 2008 and it works there as well..........thanks

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Thanks for the reply.

    I did try the SQL code in SQL Server 2005, 2008 and am pretty sure it works in the SQL 11 (Denali - CTP) too 😀

    Although you have the sys.sysProcesses versions in SQL server 2005 onwards I reckon sysProcesses will be there for backward compatibility for the previous SQL versions.

    Mehernosh

    Mehernosh.

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

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