Microsoft Knowledge Base Email Alertz

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

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

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

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  (http://kbalertz.com/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 nameFile versionFile sizeDateTimePlatform
Aspnet_wp.exe2.0.50727.308231,56025-Nov-200804:59x86
Cordacwks.dll2.0.50727.3082990,03225-Nov-200804:59x86
Mscorjit.dll2.0.50727.3082364,87225-Nov-200804:59x86
Mscorlib.dll2.0.50727.30824,546,56025-Nov-200804:59x86
Mscorwks.dll2.0.50727.30825,813,57625-Nov-200804:59x86
System.data.oracleclient.dll2.0.50727.3082486,40025-Nov-200804:59x86
System.web.dll2.0.50727.30825,242,88025-Nov-200804:59x86
System.xml.dll2.0.50727.30822,048,00025-Nov-200804:59x86
Webengine.dll2.0.50727.3082436,04025-Nov-200804:59x86
.NET Framework 2.0 SP2 IA64
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Aspnet_wp.exe2.0.50727.308283,27224-Nov-200823:21IA-64
Aspnet_wp.exe2.0.50727.308231,56025-Nov-200804:59x86
Cordacwks.dll2.0.50727.30823,085,64824-Nov-200823:22IA-64
Cordacwks.dll2.0.50727.3082990,03225-Nov-200804:59x86
Mscorjit.dll2.0.50727.30822,558,28024-Nov-200823:21IA-64
Mscorjit.dll2.0.50727.3082364,87225-Nov-200804:59x86
Mscorlib.dll2.0.50727.30824,005,88824-Nov-200823:22IA-64
Mscorlib.dll2.0.50727.30824,546,56025-Nov-200804:59x86
Mscorwks.dll2.0.50727.308220,151,62424-Nov-200823:21IA-64
Mscorwks.dll2.0.50727.30825,813,57625-Nov-200804:59x86
System.data.oracleclient.dll2.0.50727.3082505,34424-Nov-200823:21IA-64
System.data.oracleclient.dll2.0.50727.3082486,40025-Nov-200804:59x86
System.web.dll2.0.50727.30824,771,84024-Nov-200823:21IA-64
System.web.dll2.0.50727.30825,242,88025-Nov-200804:59x86
System.xml.dll2.0.50727.30822,048,00025-Nov-200804:59x86
System.xml.dll2.0.50727.30822,048,00025-Nov-200804:32x86
Webengine.dll2.0.50727.30821,227,08024-Nov-200823:21IA-64
Webengine.dll2.0.50727.3082436,04025-Nov-200804:59x86
.NET Framework 2.0 SP2 x64
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Aspnet_wp.exe2.0.50727.308243,33624-Nov-200823:29x64
Aspnet_wp.exe2.0.50727.308231,56025-Nov-200804:59x86
Cordacwks.dll2.0.50727.30821,765,71224-Nov-200823:29x64
Cordacwks.dll2.0.50727.3082990,03225-Nov-200804:59x86
Mscorjit.dll2.0.50727.30821,577,80024-Nov-200823:29x64
Mscorjit.dll2.0.50727.3082364,87225-Nov-200804:59x86
Mscorlib.dll2.0.50727.30824,562,94424-Nov-200823:29x64
Mscorlib.dll2.0.50727.30824,546,56025-Nov-200804:59x86
Mscorwks.dll2.0.50727.308210,077,51224-Nov-200823:29x64
Mscorwks.dll2.0.50727.30825,813,57625-Nov-200804:59x86
System.data.oracleclient.dll2.0.50727.3082502,27224-Nov-200823:29x64
System.data.oracleclient.dll2.0.50727.3082486,40025-Nov-200804:59x86
System.web.dll2.0.50727.30825,255,16824-Nov-200823:29x64
System.web.dll2.0.50727.30825,242,88025-Nov-200804:59x86
System.xml.dll2.0.50727.30822,048,00025-Nov-200804:59x86
System.xml.dll2.0.50727.30822,048,00025-Nov-200804:32x86
Webengine.dll2.0.50727.3082743,24024-Nov-200823:29x64
Webengine.dll2.0.50727.3082436,04025-Nov-200804:59x86

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
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate