Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Whats wrong with this query?

Author  Topic 

jagpalsingh4
Starting Member

7 Posts

Posted - 2008-06-10 : 06:36:14
Hi,
How can we see blocked process on sql 2000i have this query but plz tell me is it working fine or not bcuase i am confuse bcuase when ever try to use this query it always shows me blocked process '0' so plz help me there is query

select blockedusers=count(*) from master.dbo.sysprocesses where blocked <> 0


jagpalsingh

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-10 : 10:39:58
Well... You are COUNTING the blocked processes and the query returns 0 (zero) which means NO processes are blocked.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-06-11 : 17:01:07
You can also use sp_who or sp_who2 from quesry analyzer to retrieve the info as well.

Terry
Go to Top of Page
   

- Advertisement -