Isso mostra o número de conexões por cada DB:
SELECT
DB_NAME(dbid) as DBName,
COUNT(dbid) as NoOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame
E isso dá conexões totais:
SELECT
COUNT(dbid) as TotalConnections
FROM
sys.sysprocesses
WHERE
dbid > 0
De c#, você pode seguir:
http:// www.c-sharpcorner.com/UploadFile/dsdaf/ConnPooling07262006093645AM/ConnPooling.aspx Outra boa referência pode ser encontrada em:
http:// www.wduffy.co.uk/blog/monitoring-database-connections/
Chame o método estático
ReleaseObjectPool
no OleDbConnection
- consulte http://msdn.microsoft .com/en-us/library/system.data.oledb.oledbconnection.releaseobjectpool.aspx