SELECT DB_NAME(dbid) as "Database", COUNT(dbid) as "Number Of Open Connections", loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame;
SELECT DB_NAME(dbid) as "Database", COUNT(dbid) as "Number Of Open Connections", loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame;