I'm using distributed transaction with Oracle 10g and ODP.Net. After some days the software throws the following exception:
Oracle.DataAccess.Client.OracleException Unable to enlist in a distributed transaction at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
After that, 'ORA-02049 timeout: distributed transaction waiting for Lock' will occur.
How can I debug this problem? Why is a transaction locking? Where can I enable debug settings int the database or for the OPC.Net Client? How can I kill the locking distributed transaction based on v$transaction view? Right now, I have to restart my software and this is very annoying and expensive.
As far as I know, the maximum number of supported distributed transactions in which can be participate, is 10.
When you use a connection string you can try to invoke Enlist=false; as connection pool parameter.