February 12, 2010 at 10:05 pm
hi guys, is there a difference between checking for top running processes for a specific db.
select top 10 * from sys.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
vs
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
in my second one i usually get more results.
February 13, 2010 at 5:55 am
what do you mean my top running :w00t:
I think sp_lock give you valuable information and based on that you can investigate further
😛
----------
Ashish
February 13, 2010 at 6:15 am
In SQL 2005 both point to the same view as far as I know.
the data actually exists in the invisible resource database.
One thing to remember is the metadata visibility in SQL 2005.
When you query sysprocesses as an unpriviliged user (without view server state)
You'll only see processes you "own".
Cheers!
Craig Outcalt
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply