Getting current number of connections in connection pool

Getting current number of connections in connection pool

Post by Wayne X » Thu, 22 Jan 2004 00:36:42


Is there a way to get current number of SQL connections in connection pool?

I want use it for monitoring purpose. My connection pool randomizely maxed
out and it is affecting production.
 
 
 

Getting current number of connections in connection pool

Post by Mickey Wil » Thu, 22 Jan 2004 02:36:17

There are several perf counters that reflect usage. Fire up perfmon and look
at .NET CLR Data. Or use the PerformanceCounter class if you want run-time
stats within your app.

In any case, make sure you're properly disposing of connections as quickly
as possible after they're used, like:
using(SqlConnection con = new SqlConnection(...))
{
// use connection here.
}

--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com




pool?

 
 
 

Getting current number of connections in connection pool

Post by Wayne X » Thu, 22 Jan 2004 06:10:11

Mickey,

Thank you for quick reply. Yes I added "using" clause in all the places,
which extended my production time, keeping live from daily to weekly.
But the connection max out problem still happen. I described you in the
other email.
Monitoring the connection pool is my last hope to control the problem.

Thanks again!
Wayne



look


maxed
 
 
 

Getting current number of connections in connection pool

Post by Pooja » Thu, 22 Jan 2004 19:50:52

http://www.yqcomputer.com/

**********************************************************************
Sent via Fuzzy Software @ http://www.yqcomputer.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...