title: Transaction Scope fails with BeginTransaction in Oracle : Connection is already part of a local or a distributed transaction
body: <p>Having this strange behavior while using OracleConnection with TransactionScope. 
  If i try to use connection.BeginTransaction() in a transaction scope i get simple elegant InvalidOperationException : Connection is already part of a local or a distributed transaction.</p>
  
  <p>here is some code:</p>
  
  <pre><code>var trxOptions = new TransactionOptions();
   trxOptions.IsolationLevel = IsolationLevel.ReadCommitted;
   using (var transaction = new TransactionScope(TransactionScopeOption.Required,trxOptions))
              {
  
                  var c = ConfigurationManager.ConnectionStrings["oracle_test"].ConnectionString;
                  using (var oracle = new OracleConnection(c))
                  {
                      oracle.Open();
                      using (var tr = oracle.BeginTransaction(System.Data.IsolationLevel.ReadCommitted))
                      {
                          var cmd = oracle.CreateCommand();
                          cmd.CommandText = "INSERT INTO simple_user VALUES('a')";
  
                          cmd.ExecuteNonQuery();
                          tr.Commit();
                      }
                  }
  
  
          // now go to sql server and insert data
         transaction.Complete();
  </code></pre>
  
  <p>}</p>
  
  <p>If I dont use BeginTransaction everything works. Any ideas to make it work?</p>
  
  <p>PS: I am not having such an issue on Sql Server.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Thanks for answers i suppose i should add some edit to make my question clear. </p>
  
  <p>First off all, the code i provided above is demonstration of problem. Lets say i have two dll's MyProject.Oracle.dll and MyProject2.MsSql.dll and i want to use methods inside these dll's and they use db.BeginTransaction(). If these dlls had used  TransactionScope my outer transaction wouldnt be a problem. Distrubuted transaction would be handled without any issues. But i cannot change code inside dlls.</p>
  
  <p>And why db.BeginTransaction() works for    SqlServer but not for Oracle?  </p>