views:

637

answers:

1

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.

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.

Does anyone know what could cause the transaction to behave like this and keep the locks after abort has been called?

Thanks

+1  A: 

There are known issues around the use of distributed transactions when using the Microsoft Data Provider for Oracle.

If you are using it, try switching to the ODP.NET provider, which should fix your transaction problems.

Jerome Laban
Using ODP.NET changed the behavior, but did not solve the problem. Now, some transaction get stuck in the "Preparing" state and actually keep the calling thread blocked.
Giovani