Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle.ManagedDataAccess.Core 2.18.6 - Transaction Scope Issue

3921255Jul 20 2019 — edited Jul 20 2019

Hi, trying to convert a project to .Net Core but have hit a stumbling block. When opening two different oracle connections within a transaction scope, the following error is received.

"Operation is not supported on this platform."

"   at OracleInternal.MTS.MTSRMManager.CCPEnlistDistributedTxnToSysTxn(OracleConnectionImpl connImpl, Transaction txn, MTSTxnRM txnRM, MTSTxnBranch txnBranch)

   at OracleInternal.MTS.MTSRMManager.CCPEnlistTransaction(OracleConnectionImpl connImpl, Transaction transaction, MTSTxnRM txnRM, MTSTxnBranch txnBranch)

   at OracleInternal.ConnectionPool.PoolManager`3.GetEnlisted(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, OracleConnection connRefForCriteria)

   at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria)

   at Oracle.ManagedDataAccess.Client.OracleConnection.Open()"

This is the code that is creating the error. When opening the second connection, the error occurs. Note, this does not happen on the standard framework Oracle.ManagedDataAccess. It only happens on the Oracle.ManagedDataAccess.Core version.

using (TransactionScope scope = new TransactionScope())

{

        using (var conn = new OracleConnection(connectionString1))

        {

              conn.Open();

         }

        using (var conn = new OracleConnection(connectionString2))

        {

             conn.Open(); //Exception occurs here

        }

       scope.Complete();

}

Any suggestions? Looks to be to do with connection pooling.

This post has been answered by Alex Keh-Oracle on Jul 20 2019
Jump to Answer

Comments

Post Details

Added on Jul 20 2019
1 comment
1,250 views