FIX: Changes are committed even if you roll back the transaction when an application uses the System.Data.OracleClient Oracle Provider to connect to an Oracle database in the .NET Framework 2.0 SP2

Article ID: 958445 – Last Review: January 21, 2009 – Revision: 1.0

FIX: Changes are committed even if you roll back the transaction when an application uses the System.Data.OracleClient Oracle Provider to connect to an Oracle database in the .NET Framework 2.0 SP2

SYMPTOMS

Consider the following scenario:

  • You install the .NET Framework 2.0 Service Pack 2 (SP2).
  • You have an application that uses the Microsoft .NET Framework 2.0. The application uses the System.Data.OracleClient Oracle Provider to connect to an Oracle database.
  • The IsolationLevel property is set to ReadCommitted or to Serializable
  • You start a transaction, and then you change the data within the transaction.

In this scenario, the changes are committed even if you roll back the transaction.

This problem occurs when one of the following conditions is true:

  • You call the BeginTransaction function for at least the second time on an existing connection.
  • A connection is returned from a connection pool. The connection was used earlier for a transaction.

RESOLUTION

To resolve this problem, apply the .NET Framework 3.5 Service Pack 1 (SP1) update that is described in Microsoft Knowledge Base article 959209.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

959209  (/Feedback.aspx?kbNumber=959209/ ) An update for the .NET Framework 3.5 Service Pack 1 is available

Prerequisites

You must have the .NET Framework 2.0 SP2 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

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 item in Control Panel.

.NET Framework 2.0 SP2 x86
Collapse this tableExpand this table
File name File version File size Date Time Platform
Aspnet_wp.exe 2.0.50727.3082 31,560 25-Nov-2008 04:59 x86
Cordacwks.dll 2.0.50727.3082 990,032 25-Nov-2008 04:59 x86
Mscorjit.dll 2.0.50727.3082 364,872 25-Nov-2008 04:59 x86
Mscorlib.dll 2.0.50727.3082 4,546,560 25-Nov-2008 04:59 x86
Mscorwks.dll 2.0.50727.3082 5,813,576 25-Nov-2008 04:59 x86
System.data.oracleclient.dll 2.0.50727.3082 486,400 25-Nov-2008 04:59 x86
System.web.dll 2.0.50727.3082 5,242,880 25-Nov-2008 04:59 x86
System.xml.dll 2.0.50727.3082 2,048,000 25-Nov-2008 04:59 x86
Webengine.dll 2.0.50727.3082 436,040 25-Nov-2008 04:59 x86
.NET Framework 2.0 SP2 IA64
Collapse this tableExpand this table
File name File version File size Date Time Platform
Aspnet_wp.exe 2.0.50727.3082 83,272 24-Nov-2008 23:21 IA-64
Aspnet_wp.exe 2.0.50727.3082 31,560 25-Nov-2008 04:59 x86
Cordacwks.dll 2.0.50727.3082 3,085,648 24-Nov-2008 23:22 IA-64
Cordacwks.dll 2.0.50727.3082 990,032 25-Nov-2008 04:59 x86
Mscorjit.dll 2.0.50727.3082 2,558,280 24-Nov-2008 23:21 IA-64
Mscorjit.dll 2.0.50727.3082 364,872 25-Nov-2008 04:59 x86
Mscorlib.dll 2.0.50727.3082 4,005,888 24-Nov-2008 23:22 IA-64
Mscorlib.dll 2.0.50727.3082 4,546,560 25-Nov-2008 04:59 x86
Mscorwks.dll 2.0.50727.3082 20,151,624 24-Nov-2008 23:21 IA-64
Mscorwks.dll 2.0.50727.3082 5,813,576 25-Nov-2008 04:59 x86
System.data.oracleclient.dll 2.0.50727.3082 505,344 24-Nov-2008 23:21 IA-64
System.data.oracleclient.dll 2.0.50727.3082 486,400 25-Nov-2008 04:59 x86
System.web.dll 2.0.50727.3082 4,771,840 24-Nov-2008 23:21 IA-64
System.web.dll 2.0.50727.3082 5,242,880 25-Nov-2008 04:59 x86
System.xml.dll 2.0.50727.3082 2,048,000 25-Nov-2008 04:59 x86
System.xml.dll 2.0.50727.3082 2,048,000 25-Nov-2008 04:32 x86
Webengine.dll 2.0.50727.3082 1,227,080 24-Nov-2008 23:21 IA-64
Webengine.dll 2.0.50727.3082 436,040 25-Nov-2008 04:59 x86
.NET Framework 2.0 SP2 x64
Collapse this tableExpand this table
File name File version File size Date Time Platform
Aspnet_wp.exe 2.0.50727.3082 43,336 24-Nov-2008 23:29 x64
Aspnet_wp.exe 2.0.50727.3082 31,560 25-Nov-2008 04:59 x86
Cordacwks.dll 2.0.50727.3082 1,765,712 24-Nov-2008 23:29 x64
Cordacwks.dll 2.0.50727.3082 990,032 25-Nov-2008 04:59 x86
Mscorjit.dll 2.0.50727.3082 1,577,800 24-Nov-2008 23:29 x64
Mscorjit.dll 2.0.50727.3082 364,872 25-Nov-2008 04:59 x86
Mscorlib.dll 2.0.50727.3082 4,562,944 24-Nov-2008 23:29 x64
Mscorlib.dll 2.0.50727.3082 4,546,560 25-Nov-2008 04:59 x86
Mscorwks.dll 2.0.50727.3082 10,077,512 24-Nov-2008 23:29 x64
Mscorwks.dll 2.0.50727.3082 5,813,576 25-Nov-2008 04:59 x86
System.data.oracleclient.dll 2.0.50727.3082 502,272 24-Nov-2008 23:29 x64
System.data.oracleclient.dll 2.0.50727.3082 486,400 25-Nov-2008 04:59 x86
System.web.dll 2.0.50727.3082 5,255,168 24-Nov-2008 23:29 x64
System.web.dll 2.0.50727.3082 5,242,880 25-Nov-2008 04:59 x86
System.xml.dll 2.0.50727.3082 2,048,000 25-Nov-2008 04:59 x86
System.xml.dll 2.0.50727.3082 2,048,000 25-Nov-2008 04:32 x86
Webengine.dll 2.0.50727.3082 743,240 24-Nov-2008 23:29 x64
Webengine.dll 2.0.50727.3082 436,040 25-Nov-2008 04:59 x86

WORKAROUND

For already deployed applications, no workaround is available. All commands execute in auto-commit mode if you start the second transaction on an existing connection.

If connection pooling is not required to provide acceptable performance, you can use one of the following workarounds:

  • Add the Pooling=false parameter to the connection string.
  • Close and then reopen the connection before you start the next transaction.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the Applies to section.

MORE INFORMATION

The following code sample shows the problem:

OracleConnection connection = new OracleConnection(connectionString);connection.Open();IDbTransaction transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted);IDbCommand command = connection.CreateCommand();command.CommandText = INSERT INTO Table1 (column1) VALUES ('value1');command.Transaction = transaction;command.ExecuteNonQuery();transaction.Commit();transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted);command.CommandText = DELETE FROM Table1; command.Transaction = transaction;command.ExecuteNonQuery(); // This is executed in auto-commit mode.transaction.Rollback(); // This command has not effect.


APPLIES TO
  • Microsoft .NET Framework 2.0
Keywords: 
kbhotfixserver kbqfe kbsurveynew KB958445

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image