Vista, ODP.NET / Oracle MTS
514092Jul 15 2007 — edited Jun 8 2011Hi there,
When using TransactionScope (see below for code) under Windows Vista I consistently get an OracleException stating 'Unable to enlist in distributed transaction'. Switching on tracing indicates that the following error is being thrown: 'ORA-00161: transaction branch length 100 is illegal (maximum allowed 64)'.
I'm running Oracle Client for Vista 10.2.0.3, ODP.NET 10.2.0.2and Ora MTS is 10.2.0.2. I've read in the release notes that Ora MTS doesn't work correctly under Vista which is obviously the root cause of the issue.
I've tried the latest ODAC beta (11.1.0.5.10) but get 'Unable to read or write protected memory exceptions' instead!
Can somebody from Oracle suggest a route from here?
Kindest Regards,
Dean Ward
--
using (TransactionScope txScope = new TransactionScope())
{
using (OracleConnection conn = new OracleConnection("Data Source=TEST;User Id=TEST;Password=TEST"))
{
conn.Open();
using (OracleCommand cmd = new OracleCommand("SELECT COUNT(*) FROM TEST", conn))
{
using (OracleDataReader dataReader = cmd.ExecuteReader())
{
while (dataReader.Read())
Console.WriteLine(dataReader.GetValue(0));
}
}
}
txScope.Complete();
}