title: TransactionScope and Distributed Transaction Coordinator on Oracle
body: <p>I know how to implement a distributed transaction when executing queries across two MSSQL DBs using the DTC and the <code>TransactionScope</code> class. Are there infrastructure options available for Oracle on Windows and Oracle on *nix that provide the same service and would work with the same code, E.G.:</p>
  
  <pre><code>        try
          {
              using (var transactionScope = new TransactionScope(TransactionScopeOption.Required))
              using (var connection1 = new SqlConnection("{conectionString1}"))
              using (var connection2 = new SqlConnection("{connectionString2"))
              {
                  var command = connection1.CreateCommand();
  
                  command.CommandText = "insert into test values ('TEST') select @@identity";
  
                  connection1.Open();
  
                  var newRowId = command.ExecuteScalar();
  
                  Console.WriteLine("Inserted new row in connection 1 with ID : {0}", newRowId);
                  //transaction promoted on second connection open
                  connection2.Open();
  
                  command = connection2.CreateCommand();
                  command.CommandText = "set identity_insert TEST on";
                  command.ExecuteNonQuery();
  
                  command.CommandText = string.Format("insert into test (Id, Text) values ({0},'TEST')", newRowId);
                  command.ExecuteNonQuery();
  
                  Console.WriteLine("Inserted new row in connection 2");
  
                  transactionScope.Complete();
              }
  
              Console.WriteLine("Transaction commited");
          }
          catch (Exception)
          {
              Console.WriteLine("Transaction rolled back");
          }
  </code></pre>