Friday, July 22, 2011

Check for open connections on SQL Server

Wonder how many open connections you have?  Run this:


SELECT DB_NAME(dbid) as 'Database', COUNT(dbid) as 'Open Connections' from master.dbo.sysprocesses with (nolock)
GROUP BY dbid

Results are:

Database Open Connections
SomeDBName 1

No comments:

Labels