Dette viser antallet af forbindelser pr. hver DB:
SELECT
DB_NAME(dbid) as DBName,
COUNT(dbid) as NoOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame
Og dette giver samlede forbindelser:
SELECT
COUNT(dbid) as TotalConnections
FROM
sys.sysprocesses
WHERE
dbid > 0
Fra c# kan du følge :
http:// www.c-sharpcorner.com/UploadFile/dsdaf/ConnPooling07262006093645AM/ConnPooling.aspx
En anden god reference kan findes på:
http:// www.wduffy.co.uk/blog/monitoring-database-connections/
Kald den statiske metode ReleaseObjectPool
på OleDbConnection
- se http://msdn.microsoft .com/en-us/library/system.data.oledb.oledbconnection.releaseobjectpool.aspx