Created
June 7, 2021 09:24
-
-
Save SteGriff/02505ac25f7dd544efd2afed61d9e05f to your computer and use it in GitHub Desktop.
SQL connections
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