open connection

  • Thread starter Thread starter Owen
  • Start date Start date
O

Owen

Hello:

How know how many open connection have my application made in asp.net?, To
know if a open a new connection and not close?

Best regards.
Owen.
 
What type of connection are you talking about -- a database connection or a
website connection or something else?
 
I do not know if there is any global way, other then communicating with
SQLServer at a very low level, of finding the number of connections that are
open. Presumable you would have some mechanism for knowing when you open a
connection and keep track of them there. Also, I would suggest that you
close a connection as soon as you are finished with it. If you need to know
how many connections are open, then you may not be closing them when you
should.

If this answer does not suffice, then maybe you could explain specifically
what you are trying to do.
 
Hi Owen,

In line with what Rick explained.

Also if you directly want to monitor the number of connections instead of
programatically accessing it from your application you can also query the
same details using the PerfMon Utility.

follow the following steps.

click on startmenu -> run-> type perfmon
click on the + sign (to add the new counter)
select the sql server general statistics in the performance object
dropdownlist and choose userconnections in the counter and add it.
run your application and monitor the counter.

Regards
Ashish M Bhonkiya
 
Back
Top