I’m running into problems using MSDTC and Oracle. It’s a .net application and I’m using the TransactionScope class to control the transactions.
我在使用MSDTC和Oracle时遇到了问题。它是一个.net应用程序,我使用TransactionScope类来控制事务。
The problem is that, sometimes, if the transaction is rolled back (scope.Dispose is called without having called scope.Complete), it stays in “Aborting” state for a long time, not releasing the locked records. Even though the transactions stays in “Aborting” state, when Dispose is called to abort the transaction, it returns immediately, so the thread doesn’t get stuck.
问题是,有时,如果事务被回滚(在没有调用scope.Complete的情况下调用scope.Dispose),它会长时间保持“中止”状态,而不是释放锁定的记录。即使事务处于“Aborting”状态,当调用Dispose中止事务时,它会立即返回,因此线程不会卡住。
Does anyone know what could cause the transaction to behave like this and keep the locks after abort has been called?
有谁知道什么可能导致事务像这样行为并在调用中止后保持锁定?
Thanks
1 个解决方案
#1
1
There are known issues around the use of distributed transactions when using the Microsoft Data Provider for Oracle.
使用Microsoft Data Provider for Oracle时,存在使用分布式事务的已知问题。
If you are using it, try switching to the ODP.NET provider, which should fix your transaction problems.
如果您正在使用它,请尝试切换到ODP.NET提供程序,这将解决您的事务问题。
#1
1
There are known issues around the use of distributed transactions when using the Microsoft Data Provider for Oracle.
使用Microsoft Data Provider for Oracle时,存在使用分布式事务的已知问题。
If you are using it, try switching to the ODP.NET provider, which should fix your transaction problems.
如果您正在使用它,请尝试切换到ODP.NET提供程序,这将解决您的事务问题。