连接到某些数据库时,打开连接时收到以下错误消息。调用者是一个TransactionScope
。
从应用程序:
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()
从 Oracle.DataManagesAccess 跟踪:
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)
有些工作就好了。
我试过启用其中一些设置但没有运气
<setting name="LegacyTransactionBindingBehavior" value="1"/>
<setting name="PromotableTransaction" value="Promotable" />
<setting name="DynamicEnlistment" value="1" />
<setting name="Pooling" value="false"/>
我们正在将之前访问 Oracle 11g 的代码迁移到 Oracle 19c。
我正在使用 Oracle.ManagedDataAccess 21.4.0。同样的问题发生在 19.13.0