This article has been archived. It is offered "as is" and will no longer be updated.
OracleConnection objects that experience errors because sessions or connections are dropped are returned to the connection pool when the Connection.Close method is called. Then, the OracleConnection objects are reused. This may cause unexpected behavior.
For example, you may try to connect during a server restart or a connection may be dropped on the network. Although the expected behavior is to discard the bad connection and to try to use a new physical connection, the actual behavior is that the bad connection is reused from the connection pool.
In the Microsoft .NET Framework 1.1, if one or more of the following Oracle error codes are received, the OracleClient data provider does not correctly discard the connection from the connection pool even though the connection is no longer valid:
All errors between 12500 and 12699, inclusive
In the .NET Framework 1.1 Service Pack 1 (SP1), the connection object will be discarded if one or more of these error codes are encountered except for the following error codes:
If you experience one of these three error codes, you must apply this hotfix.
For a description of the Oracle error codes, see your Oracle documentation.
Note The hotfix that is described in this article does not prevent the original cause of these errors. However, when these Oracle errors are encountered on a connection, the hotfix lets that connection be correctly removed from the pool so that it is not reused.
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.
To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
Service pack information
Note All error codes except for the following were handled correctly and were fixed in the .NET Framework 1.1 SP1:
We recommend that you install the .NET Framework 1.1 SP1 to fix this problem because service packs are tested more rigorously than hotfixes. However, if you experience one or more of these three Oracle error codes, you must apply this hotfix. In that case, obtain the hotfix by contacting Microsoft Product Support Services. Applying this hotfix will make sure that the connections that experience these errors are not pooled and reused.
For additional information about the .NET Framework 1.1 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
885055 How to obtain Microsoft .NET Framework 1.1 Service Pack 1
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
The .NET Framework 1.1 RTM
Date Time Version Size File name ------------------------------------------------------------------------------------ 24-May-2004 20:47 1.1.4322.1046 303,104 System.data.oracleclient.dll 26-May-2004 00:50 1.0.859.2574 1,126,192 Ndp1.1-kb830173-x86.exe 27-May-2004 22:54 220.127.116.11 465,648 Windowsserver2003-kb830173-x86-enu.exe 14-Oct-2003 16:55 1.1.4322.957 303,104 System.data.oracleclient.dll 15-Oct-2003 00:58 18.104.22.168 1,072,808 Ndp1.1-kb830173-x86.exe 17-Oct-2003 23:00 989,452 Ndp1.1-kb830173-x86.zip
The .NET Framework 1.1 SP1
Date Time Version Size File name ---------------------------------------------------------------------------------- 23-Oct-2004 02:01 1.1.4322.2038 303,104 System.data.oracleclient.dll 14-Oct-2004 22:59 1.0.1045.3098 966,432 Ndp1.1sp1-kb887548-x86.exe 24-Oct-2004 01:30 22.214.171.124 485,104 Windowsserver2003-kb887548-x86-enu.exe 24-Oct-2004 01:30 126.96.36.199 484,080 Windowsserver2003-kb887548-x86-kor.exe
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Steps to reproduce the behavior
The following series demonstrates that even after a .NET application is disconnected from the Oracle server, the Microsoft .NET Managed Provider for Oracle does not dispose the connection from the connection pool:
Create an ADO.NET application that uses the Microsoft Oracle .NET Provider to access the Oracle back-end, compile, and then run the application.
Connect to the Oracle Server by using the ADO.NET application that you created in step 1.
Close the Oracle connection by stopping the Oracle server or by disconnecting the client from the physical network.
The expected behavior is that the application receives an error that indicates that the session has been terminated and that the connection must be discarded from the pool. The next time that you open a connection, you expect to use a new physical connection to the server.
However, the actual behavior is that the connection that encounters the problem is returned to the Oracle client pool. This connection can later be retrieved from the pool for the .NET application the next time that the application tries to open a connection to the server.
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
310985 How to use the ODBC .NET Managed Provider in Visual Basic .NET and connection strings