Това показва броя на връзките за всяка DB:
SELECT
DB_NAME(dbid) as DBName,
COUNT(dbid) as NoOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame
И това дава общи връзки:
SELECT
COUNT(dbid) as TotalConnections
FROM
sys.sysprocesses
WHERE
dbid > 0
От c# можете да следвате:
http:// www.c-sharpcorner.com/UploadFile/dsdaf/ConnPooling07262006093645AM/ConnPooling.aspx
Друга добра справка може да бъде намерена на:
http:// www.wduffy.co.uk/blog/monitoring-database-connections/
Извикайте статичния метод ReleaseObjectPool
на OleDbConnection
- вижте http://msdn.microsoft .com/en-us/library/system.data.oledb.oledbconnection.releaseobjectpool.aspx