Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How To Determine The Number of Open Connections In Sql Server 2000 Expand / Collapse
Author
Message
Posted Monday, September 24, 2012 1:22 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, October 31, 2013 10:32 AM
Points: 57, Visits: 379
Good Afternoon Guys,


would it be possible to know the number of connections a person has in a Database in Sql Server 2000? i saw a query that actually counts the number of connection but only runs in SQL Server 2005. here is the query.



SELECT DB_NAME(dbid) as DBName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame


is there anything similar in SQL server 2000 that does the same thing that the query stated above does?


Thanks


Noel
Post #1363699
Posted Monday, September 24, 2012 1:32 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 2:19 PM
Points: 199, Visits: 1,501
The query will work simply by removing the "sys." from sysprocesses. master..sysprocesses exists in SQL 2000.
Post #1363701
Posted Tuesday, December 4, 2012 11:51 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, September 11, 2014 3:38 AM
Points: 251, Visits: 613
SELECT
COUNT(dbid) as TotalConnections
FROM
sys.sysprocesses
WHERE
dbid > 0
If more information is required
use
sp_who2 'ACTIVE'
Post #1392805
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse