Microsoft Developer Network >
Forums Home
>
SQL Server Forums
>
SQL Server Data Access
>
oracle Connection is ACTIVE/NonACTIVE even connection is close from Dot net
oracle Connection is ACTIVE/NonACTIVE even connection is close from Dot net
- I have an application that connects to an oracle database and performs
updates in the database. When the updates are finished the application
performs:
Commit on the connection object.
Close on the command object.
Close on the connection.
Dispose on the command object.
Dispose on the connection object.
Still the connection exists in the database (I am loking in the Oracle
database).
From the .net application's view the connection is closed, but not from
oracle's view.
"INACTIVE" Session is Display in Oracle
but when i Close the dot net application all inactive session has been closed from oracle also.
now i want to remove INACTIVE Session from Oracle when connection is colsed or Disposed- Moved byShayne Burgess - MSFT Wednesday, November 04, 2009 11:39 PMIncorrectly Filed (From:ADO.NET Data Services (Pre-Release))
Answers
- Hi,
I'm not sure how Oracle handles this kind of situation, but in SQLServer & .Net prospective, most applications use only one or a few different configurations for connections. This means that during application execution, many identical connections will be repeatedly opened and closed. To minimize the cost of opening connections, ADO.NET uses an optimization technique called connection pooling, and that is to say, the connection will be moved to the connection pool.
For more information, you can see:
http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx
http://ondotnet.com/pub/a/dotnet/2004/02/09/connpool.html
If you don't want such feature, you can disable it.
http://databases.aspfaq.com/database/how-do-i-enable-or-disable-connection-pooling.html
Besides, what is the version of your Oracle client, if the version of the Oracle Client that goes with the .Net 1.0 framework, you need to update it.
And for remove inactive session in Oracle, see: KILL SESSION IN ORACLE.
http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
For SQLServer, try:
http://technet.microsoft.com/en-us/library/ms173730.aspx
Thanks.
Microsoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer byJohn C GordonMSFT, ModeratorThursday, November 05, 2009 6:37 PM
All Replies
- Hi,
I'm not sure how Oracle handles this kind of situation, but in SQLServer & .Net prospective, most applications use only one or a few different configurations for connections. This means that during application execution, many identical connections will be repeatedly opened and closed. To minimize the cost of opening connections, ADO.NET uses an optimization technique called connection pooling, and that is to say, the connection will be moved to the connection pool.
For more information, you can see:
http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx
http://ondotnet.com/pub/a/dotnet/2004/02/09/connpool.html
If you don't want such feature, you can disable it.
http://databases.aspfaq.com/database/how-do-i-enable-or-disable-connection-pooling.html
Besides, what is the version of your Oracle client, if the version of the Oracle Client that goes with the .Net 1.0 framework, you need to update it.
And for remove inactive session in Oracle, see: KILL SESSION IN ORACLE.
http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
For SQLServer, try:
http://technet.microsoft.com/en-us/library/ms173730.aspx
Thanks.
Microsoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer byJohn C GordonMSFT, ModeratorThursday, November 05, 2009 6:37 PM

