Forum Stats

  • 3,728,429 Users
  • 2,245,616 Discussions
  • 7,853,523 Comments

Discussions

Oracle.ManagedDataAccess.Core 2.18.6 - Transaction Scope Issue

3921255
3921255 Member Posts: 1
edited July 2019 in ODP.NET

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.

3921255

Best Answer

Answers

Sign In or Register to comment.