Created
August 3, 2017 09:01
-
-
Save jonny64bit/8d1f2122ae0a7434f9296ac84b4d1ff9 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