Get Number of connections active per each DataBase

Ranjeet_8
Posted by Ranjeet_8 under Sql Server category on | Points: 40 | Views : 1555
SELECT 
DB_NAME(dbid) as DataBase_Name,
COUNT(dbid) as Number_Of_Connections,
loginame as Login_Name
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame

Comments or Responses

Login to post response