您的位置:首页 > 其它

sp_who status means

2008-05-13 12:01 183 查看
sp_who status means

1. Runnable means that someone is executing on the SQL server.
2. Sleeping means that it's an inactive process (someone has the application open but isn't submitting any queries)
3. Background means it's a process that SQL Server uses that runs in the background.

[align=center]RE: sp_who question(from http://www.lazydba.com/sql/1__3262.html[/align]
From: "John Thomas" <[Email Address Removed]
Subject: RE: sp_who question
Date: Thu, 28 Aug 2003 14:12:24 -0700
I think if you read the article that would help you in trouble shooting.

I always keep any useful articles in my favorites folder. News groups
have been my predominant source for such articles.

John

-----Original Message-----
From: Fang, Elaine [mailto:Elaine.[Email Address Removed]
Sent: Thursday, August 28, 2003 2:04 PM
To: John Thomas; LazyDBA.com Discussion
Subject: RE: sp_who question

Thanks a lot, John! Thoes KB articles will be very helpful!

Actually, that process was running a bunch of batches which supposed to
upgrade db schema. Obviously I need to modify my code (batches) so it
won't sleep there while still hold all the locks. How do I trouble shoot
which part might went wrong?

Also, how did you quickly find the KB articles that of your interest? I
tried MSDB a few times, didn't work that well for me.

Thanks again!

Elaine

-----Original Message-----
From: John Thomas [mailto:[Email Address Removed] Thursday, August 28, 2003 3:52 PM
To: Fang, Elaine; LazyDBA.com Discussion
Subject: RE: sp_who question

Elaine,

You are right. "Sleeping" means that the process is not currently
running. It usually indicates the process waiting for a command from the
application. Now if you are in between a transaction, this process can
block other processes. The status that is showed under the status field
in the sp_lock output is the lock request status. Grant indicates that
the lock has been granted.

Check out this KB article for more info:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q224453
HTH,
John

-----Original Message-----
From: Fang, Elaine [mailto:Elaine.[Email Address Removed]
Sent: Thursday, August 28, 2003 1:16 PM
To: LazyDBA.com Discussion
Subject: sp_who question

Hi,

We are running into a situation that multiple processes are blocking
each other (not dead lock). When I use sp_who to show the processes, it
show the blocking process' status is 'sleeping'!!! So does it mean it's
not doing anything now? If that's the case, why it's still blocking
other processes?

Also, when using sp_lock, if the status column shows 'Grant', does it
mean the lock is being granted to the current process? How do I find
more detailed explaination on the fields of sp_who and sp_help. BOL
doesn't seem to be enough.

Thanks a lot!

Elaine
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: