Thursday, September 08, 2016

Manage a cross server transaction without configuring MSDTC

Usually managing a transaction across two servers would require a distributed transaction controller being setup between the two server.

Below is a scenario where this is managed without a MSTDC configution.

2 comments:

Jan B. Kjeldsen said...

It goes without saying, that it happens without the benefit of MSDTC: reliable transactions.
If your transaction fails after the update of the "other" database, things are bad.
I see no ttsbegin/ttscommit in your code, it may be outside this method, in which case your two try/catch blocks does not work.

Santosh Singh said...

Ofcourse the solution is only a work around

The basis being that the chances of a commit to a local database is fairly low. Also considering that one round of updates to the local table structure has already been done using a temp record set.