how to see active SQL Server connections?
Run below query and it will show you the dbname and number of connections
SELECT
DB_NAME(dbid) as DatabaseName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame;
SELECT
DB_NAME(dbid) as DatabaseName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame;
0 comments: