At times, we need to check the number of active connections for each Database on our server. This can be done easily using the following script. The script displays the DatabaseName, the number of connections and the login name :
SELECT db_name(dbid) as DatabaseName, count(dbid) as NoOfConnections,
loginame as LoginName
WHERE dbid > 0
GROUP BY dbid, loginame
Did you like this post?
|subscribe via rss||subscribe via e-mail|
|print this post||follow me on twitter|