SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sysprocesses


sysprocesses

Author
Message
DBA-640728
DBA-640728
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3097 Visits: 2000
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.
crazy4sql
crazy4sql
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4329 Visits: 4514
what do you mean my top running w00t
I think sp_lock give you valuable information and based on that you can investigate further
:-P

----------
Ashish
SQLBOT
SQLBOT
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2060 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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search