How find out number of active SQL Server connections?

 

SELECT

    DB_NAME(dbid) as DBName,

    COUNT(dbid) as NumberOfConnections,

    loginame as LoginName FROM sys.sysprocesses

WHERE dbid >GROUP BY dbid, loginame;

Comments

Popular posts from this blog

unpivot in sql server above version 2016

UNPIVOT in sql server