Ivan Vacacela
Old Hand
Points: 312
More actions
October 1, 2007 at 1:16 pm
#375083
Hi,
Please, I like to know how can I check what is the number of connections already opened for an specific Database on SQL Server 2005.
Thanks in advance.
Ivan
Adam Angelini
SSCrazy Eights
Points: 8548
October 1, 2007 at 1:50 pm
#737869
use sp_who2
noeld
SSC Guru
Points: 96590
October 1, 2007 at 2:28 pm
#737886
select * from sys.dm_exec_sessions -- 2005 style 😉
* Noel
Steve Jones - SSC Editor
Points: 738683
October 1, 2007 at 9:20 pm
#737983
Not really supported, but counting by database.
select count(s.spid)
, d.name d
from sys.sysprocesses s
inner join sys.databases d
on s.dbid = d.database_id
group by d.name
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply