When connecting to some databases, I get the following error message when opening a connection.
The caller is a TransactionScope
.
From the app:
MTSRMManager.CCPEnlistDistributedTxnToSysTxn(OracleConnectionImpl connImpl, Transaction txn, MTSTxnRM txnRM, MTSTxnBranch txnBranch)
MTSRMManager.CCPEnlistTransaction(OracleConnectionImpl connImpl, Transaction transaction, MTSTxnRM txnRM, MTSTxnBranch txnBranch)
PoolManager`3.GetEnlisted(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, OracleConnection connRefForCriteria)
OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria)
OracleConnection.Open()
From the Oracle.DataManagesAccess trace :
2021-12-23 16:55:32.568831 TID:12 (PRI) (EXT) (MTS) PSPEManager.Promote() Local TxnID = 2c5401a0-d202-4269-b095-e668f72bbfbb:1TxnID = 149102f3-5961-45ef-be45-7ece3bfefd4f
2021-12-23 16:55:32.591837 TID:12 (PRI) (ENT) MTSRMManager.HandleException()
2021-12-23 16:55:32.603931 TID:12 (PRI) (ERR) (MTS) MTSRMManager.HandleException() (txnid=2c5401a0-d202-4269-b095-e668f72bbfbb:1) (DUMP)(txnid=2c5401a0-d202-4269-b095-e668f72bbfbb:1) (service name=sys$users) (pmid=38945919)[(count:0)] System.InvalidOperationException: L'opération n'est pas valide dans l'état actuel de l'inscription.
at System.Transactions.EnlistmentState.InternalAborted(InternalEnlistment enlistment)
at System.Transactions.TransactionStateAborted.EnterState(InternalTransaction tx)
at System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx)
at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
at System.Transactions.Transaction.Promote()
at System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction)
at System.Transactions.TransactionInterop.GetTransmitterPropagationToken(Transaction transaction)
at OracleInternal.MTS.MTSRMManager.CCPEnlistDistributedTxnToSysTxn(OracleConnectionImpl connImpl, Transaction txn, MTSTxnRM txnRM, MTSTxnBranch txnBranch)
Some work just fine.
I've tried enabling some of these settings with no luck
<setting name="LegacyTransactionBindingBehavior" value="1"/>
<setting name="PromotableTransaction" value="Promotable" />
<setting name="DynamicEnlistment" value="1" />
<setting name="Pooling" value="false"/>
We're migrating code previously accessing Oracle 11g to Oracle 19c.
I'm using Oracle.ManagedDataAccess 21.4.0. Same problem happens with 19.13.0