I am using the .NET 2.0 / 3.5 environment for my application. I need to run several SQL commands for multiple connections, and each connection is on a different server (Oracle, SQL Server). I need to make sure that these commands are transactional.
For example: I need to perform an INSERT on a table for both Oracle databases and SQL Server, and then commit them if no exceptions were thrown. If an exception occurs, I would like to return to both servers if necessary.
I suspect that I will need to use System.Transactions and TransactionScope. To do this, you will need to configure Microsoft Distributed Transaction Coordinator (MSDTC) on the database servers, as well as on the application server.
I looked high and low and could not find articles describing the step-by-step setup of MSDTC with mutual authentication (including setting firewall settings and MSDTC settings.) I looked at Microsoft's MSDTC setup documentation, but it seems to be completely useless and not fully documented (unless you are find me a really good MSDN article on how to set it up).
Is using MSDTC the only way to get my work done?
If so, how did I configure it correctly?
EDIT:
- I am using Windows Server 2003 for all machines.
- I have two SQL Server. One of them is SQL Server 2000, and the other is 2005.
- I have one Oracle server and version 11g
- The application we use sometimes has to modify / create records for all three databases in a transactional way.
- This is not a problem between the keyboard and the chair. We read articles on MSDN on how to configure everything related to MSDTC, but we cannot get DTCPing and other test applications to work. We searched for a step-by-step article detailing this process. I have repeatedly come across MSDN documentation that I "missed" the steps to perform certain tasks.
Jason kanaris
source share