Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sysprocesses Expand / Collapse
Author
Message
Posted Friday, February 12, 2010 10:05 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, June 12, 2014 11:12 AM
Points: 537, Visits: 1,917
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.




Post #865047
Posted Saturday, February 13, 2010 5:55 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 4:50 AM
Points: 880, Visits: 4,056
what do you mean my top running
I think sp_lock give you valuable information and based on that you can investigate further


----------
Ashish
Post #865078
Posted Saturday, February 13, 2010 6:14 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, January 3, 2014 10:59 AM
Points: 626, Visits: 836
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



Tips for new DBAs: http://www.sqlservercentral.com/articles/Career/64632
My other articles: http://www.sqlservercentral.com/Authors/Articles/Craig_Outcalt/560258
Post #865079
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse