Forum Stats

  • 3,826,180 Users
  • 2,260,605 Discussions
  • 7,896,809 Comments

Discussions

Transaction aborts after installing ODAC 12c Release 3

geek_dad
geek_dad Member Posts: 5
edited Oct 10, 2015 1:09PM in ODP.NET

I have .net code that used a transaction scope which works fine using ODAC 11g Release 4, but fails with "Unable to enlist in a distributed transaction" using ODAC 12c Release 1,2, or 3.  The transaction to a single database.  I am at a loss for what could be the issue.

This issue occurs on both Windows 7 and Windows Server 2008 R2.

I have reviewed the trace logs for both the Microsoft Distributed Transaction Server, and the Oracle Services for Microsoft Transactions Services.  The MSDTC trace logs indicate that the transaction abort was request was received from the calling application ("RECEIVED_ABORT_REQUEST_FROM_BEGINNER").  The ORAMTS trace logs indicate an OCI error and that there was an attempt to begin a distributed transaction with out logging on ("OCI_ERROR - 2048." ,  "ORA-02048: attempt to begin distributed transaction without logging on")

I can reproduce this error with a simple code example with just tried to insert records into a table.  If I change the data provider to "System.Data.OracleClient", or uninstall 12c and install 11g this code works fine.

 DataSet1TableAdapters.DataTable1TableAdapter da = new DataSet1TableAdapters.DataTable1TableAdapter();
            
            using (TransactionScope scope = new TransactionScope())
            {
                Transaction txn = Transaction.Current;
                try
                {


                   da.Insert(0, "This ia a title");


                    scope.Complete();
                    lblmessage.Text = "Transaction Succeeded.";
                }
                catch (Exception ex)
                {
                    txn.Rollback();
                    lblmessage.Text = "Transaction Failed.";
                }

Can anyone provide any ideas what is happening?  I really would like to use ODAC 12c.

Thanks.

Tagged:

Best Answer

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,152 Employee
    edited Feb 9, 2015 1:46AM

    Moving to the ODP.NET forum to get a wider audience.

  • user12270593
    user12270593 Member Posts: 8 Blue Ribbon
    edited May 20, 2015 11:51PM

    Is this issue resolved?

    We are facing the same issue in our applications we just moved to 12c ODAC Release 3

    Applications that were working fine with 11g ODAC are failing now with below exception.

    "exception: ORA-02048: attempt to begin distributed transaction without logging on"

    Thanks

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 3,084 Employee
    edited May 21, 2015 2:40PM

    Which data provider are you using? If ODP.NET, is this with managed or unmanaged ODP.NET?

  • Greg Bachraty
    Greg Bachraty Member Posts: 13 Blue Ribbon
    edited May 28, 2015 4:42AM

    Not sure if this is the same issue but I can reliably produce an ORA-02048 with the current ODP.NET managed driver (4.121.2.0) and the simplest possible setup:

    using( var ts = new TransactionScope() )

    using( var conn = new OracleConnection() )

    {

       conn.ConnectionString = "Data Source=//host/svc;persist security info=true;user id=usr;password=pwd;enlist=true;";

       conn.Open(); // ORA-02048 thrown here
    }

    When connecting to 10g (10.2.0.3.0) an exception is always thrown at the line above, however 11g (11.2.0.1.0) works just fine.

    If I add "promotable transaction=local" then the connection works but since this completely disables distributed transactions it's only a partial workaround.

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 3,084 Employee
    edited May 29, 2015 1:50PM Answer ✓

    My team has been able to reproduce this problem with DB 10.2.0.3, but not with DB 10.2.0.5. If it's possible, I would recommend using 10.2.0.5 if you need an immediate solution.

  • geek_dad
    geek_dad Member Posts: 5
    edited Jun 24, 2015 9:05AM

    This issue was resolved after upgrading to Oracle 11g R2.  It is a known issue in Oracle 10g.

  • 3048355
    3048355 Member Posts: 1
    edited Oct 10, 2015 1:09PM

    the same issue to me  in Oracle 10.@10.2.4. is there another way to resolve  this issue  except update  database ?

This discussion has been closed.