Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count of users connected to SQL Server 2000

Status
Not open for further replies.

oricteropo

IS-IT--Management
Mar 7, 2003
29
US
is there any stored procedure or extended procedure which returns the number of connections currently open to SQL Server?
Thanks in advance,
Jeff
 
The system stored procs sp_who and sp_who2 both return details of current connections.

--James
 
Thanks,
That is what I was looking for. I was looking for a programmatic count. I found that if I just hit the system tables I get the results that I'm looking for.........

select d.name, count(spid)
from master.dbo.sysprocesses s, master.dbo.sysdatabases d
where s.dbid = d.dbid
group by d.name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top