July 21, 2011 at 6:35 am
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.
July 21, 2011 at 7:54 am
July 22, 2011 at 5:55 am
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