How To Determine The Number of Open Connections In Sql Server 2000

  • 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

  • The query will work simply by removing the "sys." from sysprocesses. master..sysprocesses exists in SQL 2000.

  • SELECT

    COUNT(dbid) as TotalConnections

    FROM

    sys.sysprocesses

    WHERE

    dbid > 0

    If more information is required

    use

    sp_who2 'ACTIVE'

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply