Created
July 6, 2016 19:33
-
-
Save juan-fdz-hawa/abc1625fc76cfabede038c4c09daab2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
DB_NAME(dbid) as DBName, | |
COUNT(dbid) as NumberOfConnections, | |
loginame as LoginName | |
FROM | |
sys.sysprocesses | |
WHERE | |
dbid > 0 | |
GROUP BY | |
dbid, loginame | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment