Pages

Thursday, September 20, 2012

Top 10 processes running in the SQL SERVER

Top 10 processes running in the SQL SERVER


Below query will find the processes which are running in the SQL Server:


 select top 10 * from master.dbo.sysprocesses
 where
 status <> 'background'
 AND cmd NOT IN
 ('signal handler','lock monitor','log writer','lazy writer','checkpoint sleep','awaiting command','TASK MANAGER')
 and spid > 50
 and spid <> @@spid
 order by CPU desc