I would like to know if you guys have any best practice when dealing with transaction between different databases vendors.

For example, if you have a C# application that save customer data in two databases (one Oracle and the other Microsoft), what would you do?

Would you use OleDbTransaction? Is it possible?

2 Answers 2


As long as you can turn on MSDTC on all of the clients and servers that the transaction involves, MSDTC works like magic. It is about as simple as wrapping all of your calls in a transactionScope, and setting a condition for transactionScope.Complete() to be called. Definitely look into the security/performance issues this can cause in certain circumastances though. It is generally inadviseable to operate transactions over the internet, since it can increase the potential for attacks, but it works fine on an intranet.


I believe that MSDTC is able to support transactions between different database instances. There are numerous resources about how to properly set up MSDTC and how to properly establish a transaction for your use case.

Another piece of advice I have when it comes to storing in different database instances altogether for the same application, you may run into situations where you may want to uniquely identify a particular record in one database over another, especially if there exists tables in both instances that have the same schema. You may want to consider uniquely identifying records by UID.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.