Forum Stats

  • 3,724,385 Users
  • 2,244,742 Discussions
  • 7,850,987 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Transaction aborts after installing ODAC 12c Release 3

geek_dad
geek_dad Member Posts: 5
edited October 2015 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

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,787 Employee
    edited May 2015 Accepted 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.

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,845 Employee
    edited February 2015

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

  • user12270593
    user12270593 Member Posts: 8 Blue Ribbon
    edited May 2015

    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: 2,787 Employee
    edited May 2015

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

  • Greg Bachraty
    Greg Bachraty Member Posts: 13 Red Ribbon
    edited May 2015

    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: 2,787 Employee
    edited May 2015 Accepted 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 June 2015

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

  • 3048355
    3048355 Member Posts: 1
    edited October 2015

    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.