ODP - Closing connections within a .Net System.Transaction
592051Aug 8 2007 — edited Jul 1 2011I've hit a weird one with ODP.Net and System.Transactions.
My code creates a new transaction scope, and within that scope executes some sprocs on multiple databases. Each of the sproc methods results in a connection.Open() and a connection.Close() within the distributed transaction (and the connection strings are different).
ODP.Net 10.2.2.20 throws an exception and writes this to the logfile:
"ODP message=Unable to enlist in a distributed transaction"
Digging around in MSDTC, I find the trace:
pid=2360 ;tid=3972 ;time=08/08/2007-16:27:41.649 ;seq=29 ;eventid=RM_ABORT_DELIVERY_FAILED_DUE_TO_CONNECTION_DOWN_NO_RETRY ;tx_guid=123669f9-830f-4d91-ab70-e9fdc582b4a3 ;"received connection down on abort request to resource manager #1002 for transaction enlistment #1. No retries will be made to
Now, I can make the code work by not closing the connections within the scope of the distributed transaction, but, and please correct me if I'm wrong, shouldn't a distributed transaction allow me to close connections inside it whilst keeping the transaction alive?
Does this sound like an ODP bug, and has anyone else come across it? We've got it happening on all of our oracle instances (10g) so it's not a one-off.
This works fine on Sql server, and works fine on Oracle if we use the same connection string to open connections. It only happens when the connection strings are different.
Any information would be great.
Graeme