skip to Main Content

Light-weight System.Transactions in ODP.NET

Starting in ODP.NET version, support for light-weight transactions has been added. Here’s an excerpt from readme.txt:

This feature enables applications to use local transactions with System.Transactions where previous versions of ODP.NET supported only distributed transactions with System.Transactions. If the PromotableTransaction registry does not exist, the default value of “promotable” is used. If “promotable” is specified, first and subsequent connections opened in the same TransactionScope will enlist in the same distributed transaction. If “local” is specified, the first connection opened in the TransactionScope will use a local transaction. If any subsequent connections are opened within the same TransactionScope, an exception will be thrown. If there are connections opened already in the TransactionScope and an OracleConnection with “Promotable Transaction=local” is attempted to be opened within the same TransactionScope, an exception will also be thrown.

This is great for those of us who use ODP.NET with System.Transactions, especially if you use global temporary tables. I found out the hard way that global temporary tables are not supported with distributed transactions.

Version is not yet available for download via You have to request it through Metalink. Search for patch number 5916667. I have not tested this patch yet but I will soon.

Chinh Do

I occasionally blog about programming (.NET, Node.js, Java, PowerShell, React, Angular, JavaScript, etc), gadgets, etc. Follow me on Twitter for tips on those same topics. You can also find me on GitHub.

See About for more info.

This Post Has 4 Comments

  1. Hi Chinh,

    How can I request it from Metalink? Do I need to create a new login?

    Also, I am not very clear about different ODP.Net versions, so I have the following doubts –

    1) If the version supports light-weight transactions, won’t the version ODP.Net 11g Beta( support it by default?

    2) I am using Oracle 10g (, so can’t I use ODP.Net 11g Beta with this version of Oracle?

    Thanks and regards,

  2. Hi Manoj:

    To get access to Oracle Metalink, you need to have an Oracle Support Identifier. If you don’t, try checking with your Oracle DBAs… that’s what I did. I asked my DBA to use his Metalink account to search and download the patch for me.

    Re ODP.Net 11g Beta, I would guess that it includes the patch as well but I am not sure. I scanned through the readme but didn’t see any mentioning of light-weight transactions. It’s fairly easy to find out yourself if it supports lightweight transactions though… write some System.Transactions code against a single Oracle database and look at the DTC Transaction Statistics in the Component Services Management Console. If the stats don’t increase then you have lightweight transactions.

    From what I have seen, the Oracle client software should be compatible with older versions of the Oracle servers. Meaning that ODP.NET version 11 should work fine with Oracle Database served 10g.


Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top