Click here to Skip to main content
13,662,961 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am using TransactionScope in C# web application like

using (TransactionScope scope = new TransactionScope())
                using (OracleConnection connection1 = new OracleConnection(conn))
                    //  Opening the connection automatically enlists it in the 
                    //  TransactionScope as a lightweight transaction.

                    //  Create the SqlCommand object and execute the first command.


with ODAC 11g this piece of code is running fine but with 12c release 3 and 4 both this is producing error

Oracle.DataAccess.Client.OracleException (0x80004005): Unable to enlist in a distributed transaction at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable, OracleLogicalTransaction m_OracleLogicalTransaction) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src, OracleLogicalTransaction m_oracleLogicalTransaction) at Oracle.DataAccess.Client.OracleConnection.Open() at WebApplication1._Default.Page_Load(Object sender, EventArgs e) 

What I have tried:

I have all the possible coding tricks but not working
Posted 23-Feb-16 0:22am
Updated 2-Mar-16 2:29am
Richard Deeming 23-Feb-16 8:21am
This thread[^] claims it's a know issue in Oracle 10g. The only suggestion in the thread is to upgrade to Oracle 11g R2.
Asp_Learner 23-Feb-16 8:45am
Thanks for comment ,any other solution I have already checked that link
Jörgen Andersson 2-Mar-16 5:43am
How many connections are you using in the TransactionScope?
Praveen_Kumar Gupta 24-Feb-16 2:15am
While you did not get a specific error message, there's a good chance that there is an incompatibility with ODP.Net (version numbers, 32bit vs 64bit DLLs) installed locally vs. on your test server.

TRY to use
Asp_Learner 24-Feb-16 7:08am
That's not the point ,I already told that its supporting ODAC 11g ,but not 12c release 3 and 4 ,we want to upgrade the application
Asp_Learner 2-Mar-16 7:43am
only 1 ,point is that why it is running fine with 11g but not with 12c

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Note that 0x80004005 does not originate from Oracle, it's a standard windows error for "Unspecified failure".
Possible reasons are missing files or access rights.

My guess is that there are missing access rights on the Oracle Client installation.

I suggest you start reading here [^]
Note that the filenames in step 6 will differ.

Next step is to read this[^] document.

Crucial question though, do you really need to use TransactionScope?
If not, use normal transactions and add Enlist=false; in the connectionstring

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.180810.1 | Last Updated 2 Mar 2016
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100