Created
October 8, 2012 09:17
-
-
Save dimaxweb/3851572 to your computer and use it in GitHub Desktop.
Check number of connections opened against the database - SQL Server 2005
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 DatabaseName, count(dbid) as NoOfConnections, | |
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