My PHP/MS Sql Server 2005/win 2003 Application occasionally becomes very unresponsive, the memory/cpu usage does not spike. If i try to open any new connection from sql man
see sp_who it gives you more details than just seeing the number of connections
in your case i would do something like this
DECLARE @temp TABLE(spid int , ecid int, status varchar(50),
loginname varchar(50),
hostname varchar(50),
blk varchar(50), dbname varchar(50), cmd varchar(50), request_id int)
INSERT INTO @temp
EXEC sp_who
SELECT COUNT(*) FROM @temp WHERE dbname = 'DB NAME'