473,395 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

open connection

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.
Nov 18 '05 #1
5 1515
What type of connection are you talking about -- a database connection or a
website connection or something else?
"Owen" <an****@prensa-latina.cu> wrote in message
news:#n**************@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.

Nov 18 '05 #2
sorry for not explain what kink connection, it database connection.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
What type of connection are you talking about -- a database connection or a website connection or something else?
"Owen" <an****@prensa-latina.cu> wrote in message
news:#n**************@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.


Nov 18 '05 #3
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" <an****@prensa-latina.cu> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
sorry for not explain what kink connection, it database connection.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
What type of connection are you talking about -- a database connection or
a
website connection or something else?
"Owen" <an****@prensa-latina.cu> wrote in message
news:#n**************@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.



Nov 18 '05 #4
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" <an****@prensa-latina.cu> wrote in message
news:#7**************@TK2MSFTNGP12.phx.gbl...
sorry for not explain what kink connection, it database connection.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
What type of connection are you talking about -- a database connection or
a
website connection or something else?
"Owen" <an****@prensa-latina.cu> wrote in message
news:#n**************@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.



Nov 18 '05 #5
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" <an****@prensa-latina.cu> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
sorry for not explain what kink connection, it database connection.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
What type of connection are you talking about -- a database connection or
a
website connection or something else?
"Owen" <an****@prensa-latina.cu> wrote in message
news:#n**************@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.



Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: C Sharp beginner | last post by:
I'm sorry about this verbose posting. This is a follow-up to my yesterday's posting. Thanks William for your reply. I understand it is a good practice to open connections as late as possible and...
4
by: Macca | last post by:
Hi, I have an windows forms application that accesses a SQL database I have a few questions as to connecting to the database. This application will run 24 hours a day. It is a monitoring...
6
by: B B | last post by:
Okay, here is what's happening: I have a reasonably fast laptop (1.4 GHz Mobile M, so comparable to 2.5GHz P4) doing .net development. Running Windows XP pro, SP2 IIS is installed and running...
14
by: martin1 | last post by:
All, I want to check wether db connection/open or not, if not it will post db connection error to user in message box The code is like: Dim objConnection As New SqlConnection _...
20
by: fniles | last post by:
I am using VB.NET 2003, SQL 2000, and SqlDataReader. As I read data from tblA, I want to populate tblB. I use SQLDataReader for both tables. I do not use thread. When I ExecuteReader on tblB, I...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
7
by: fniles | last post by:
I am using VB.Net 2003 and MS Access (connecting using OleDBConnection). I read using DataAdapter and DataSet, not DataReader. When many people try to access the database at the same time, I get...
5
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open...
6
by: =?Utf-8?B?RyBIdXN0aXM=?= | last post by:
I am creating a new MS Access DB in code, which works fine. I then try to open it & set a password. I keep getting an error that the DB is already open by my machine's Admin account. In reality it...
2
by: Tony Johansson | last post by:
Hello! How does this connection pool function actually ? As I have been told is that when the connection is returned to the pool the connection to the database is still open. What you do is that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.