July 4, 2008 at 6:58 am
Dear all
Could any one let me know how to identify the number of connections is alive for each databases in a single server.
July 4, 2008 at 7:30 am
Hi
You could try
EXEC sp_who2
But if you want to get the counts, try this:
select db_name(dbid),count(*) NumOfConns from master..sysprocesses group by dbid
Hope this is what you were looking for
Tal Ben Yosef
July 4, 2008 at 7:44 am
Ya this is what am looking for. Thanks a lot
July 4, 2008 at 12:41 pm
Hi
select count(*) from master..sysprocesses where spid > 50 will give you
a rough number. This will include logins from SQL Agent. Note that the
same user can be using multiple connections from the same application,
and thus be counted more than once.
Thanks -- Vj
July 4, 2008 at 12:41 pm
Hi
select count(*) from master..sysprocesses where spid > 50 will give you
a rough number. This will include logins from SQL Agent. Note that the
same user can be using multiple connections from the same application,
and thus be counted more than once.
Thanks -- Vj
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply