1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
508 views
by rich-c-2789 (17.6k points)

1 Answer

+1 vote
Here are two queries that will return the results displayed in the screen shot below.  The first will show how many connections are supported by the sql server installation.  The second displays how many connections are used by each database and login.  
 
Note: more doesn't always mean better when trying to increase throughput but, it may help in some cases.
-- Used to determine how many connections are supported by this server
Select @@MAX_CONNECTIONS as SupportedConnections
 
-- Used to list the connections per database and login
SELECT 
    DB_NAME(dbid) as DataBaseName, 
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
FROM
    sys.sysprocesses
WHERE 
    dbid > 0
GROUP BY 
    dbid, loginame
 

by rich-c-2789 (17.6k points)
...