|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:09 PM
Points: 47,
Visits: 340
|
|
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 1:23 PM
Points: 154,
Visits: 1,228
|
|
| The query will work simply by removing the "sys." from sysprocesses. master..sysprocesses exists in SQL 2000.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 11:06 PM
Points: 179,
Visits: 380
|
|
SELECT COUNT(dbid) as TotalConnections FROM sys.sysprocesses WHERE dbid > 0 If more information is required use sp_who2 'ACTIVE'
|
|
|
|