sp_who status means

 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.
 
 
 
RE: sp_who question(from http://www.lazydba.com/sql/1__3262.html
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
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值