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?
"Owen" <anibal@.prensa-latina.cu> wrote in message
news:#nZZExaREHA.3300@.TK2MSFTNGP09.phx.gbl...
> 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.
sorry for not explain what kink connection, it database connection.
"Peter Rilling" <peter@.nospam.rilling.net> wrote in message
news:%237CA6HcREHA.3300@.TK2MSFTNGP09.phx.gbl...
> What type of connection are you talking about -- a database connection or
a
> website connection or something else?
>
> "Owen" <anibal@.prensa-latina.cu> wrote in message
> news:#nZZExaREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > 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.
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.
"Owen" <anibal@.prensa-latina.cu> wrote in message
news:%237QUukeREHA.1396@.TK2MSFTNGP12.phx.gbl...
> sorry for not explain what kink connection, it database connection.
>
> "Peter Rilling" <peter@.nospam.rilling.net> wrote in message
> news:%237CA6HcREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > What type of connection are you talking about -- a database connection
or
> a
> > website connection or something else?
> > "Owen" <anibal@.prensa-latina.cu> wrote in message
> > news:#nZZExaREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > > 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.
> >
Hi Owen,
You can query a performance counter for open connections. The counter is:
float count = new PerformanceCounter("SQLServer:General Statistics", "User
Connections");
+++ Rick --
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
-----------
Making waves on the Web
"Owen" <anibal@.prensa-latina.cu> wrote in message
news:#7QUukeREHA.1396@.TK2MSFTNGP12.phx.gbl...
> sorry for not explain what kink connection, it database connection.
>
> "Peter Rilling" <peter@.nospam.rilling.net> wrote in message
> news:%237CA6HcREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > What type of connection are you talking about -- a database connection
or
> a
> > website connection or something else?
> > "Owen" <anibal@.prensa-latina.cu> wrote in message
> > news:#nZZExaREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > > 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.
> >
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
"Owen" <anibal@.prensa-latina.cu> wrote in message
news:%237QUukeREHA.1396@.TK2MSFTNGP12.phx.gbl...
> sorry for not explain what kink connection, it database connection.
>
> "Peter Rilling" <peter@.nospam.rilling.net> wrote in message
> news:%237CA6HcREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > What type of connection are you talking about -- a database connection
or
> a
> > website connection or something else?
> > "Owen" <anibal@.prensa-latina.cu> wrote in message
> > news:#nZZExaREHA.3300@.TK2MSFTNGP09.phx.gbl...
> > > 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.
> >
0 comments:
Post a Comment