none
Two-Phase Commit between DB2 (on AS400) and SQL Server (on Windows Server) RRS feed

  • Question

  • I started reading the following article about "Transactions in WCF services" :

    https://msdn.microsoft.com/en-us/library/ff384250.aspx

    The reason why I was interested in this article was because I want to achieve a two phase commit between a DB2 database (hosted on a AS400 system) and a SQL Server (hosted on a Windows server). 

    1) Is this possible using windows communication foundation ?

    2) If yes, does a MSDTC have to be present on the AS400 system (because of the DB2 database) ? And how is that possible ?

    3) Is there some link that displays this exact senario and manages to achieve 2PC on these 2 different systems ?


    Friday, March 27, 2015 12:46 PM

Answers

  • The reason why I was interested in this article was because I want to achieve a two phase commit between a DB2 database (hosted on a AS400 system) and a SQL Server (hosted on a Windows server).

    That's never going to work. The only way it could possible work is if the DB2 database and MS SQL server were on the same MS platform and ADO.NET was  invloved using the System.Transaction namespace. 

    1) Is this possible using windows communication foundation ?

    Not in your senario is it going to work.

    2) If yes, does a MSDTC have to be present on the AS400 system (because of the DB2 database) ? And how is that possible ?

    MSDTC is MS Windows technology. It is not IBM AS400 mainframe technology.

    3) Is there some link that displays this exact senario and manages to achieve 2PC on these 2 different systems ?

    Distributed transactions using MSDTC would be a situation where a WEB application running on a Windows O/S server machine that was using IIS started a transaction process,  and a Windows server is hosting MS SQL Server to persist the data was being used with MSDTC enabled on both machines.  Both the Web application rrunning on the Web server itself and MS SQL Server running on a server machine would be in a distribued transaction across machines.

    AS400 is IBM mainframe technology. The one thing you might be able to do in your senario is use Biztalk, which is MS .NET technology. You might be able to do something there and possibly use WCF with it too in some kind of a transaction senario between the MS Windows and the AS400. You can check it out. There are lots of articles on MS Biztalk and what it is about.

    https://msdn.microsoft.com/en-us/library/bb726925(v=bts.10).aspx

    Friday, March 27, 2015 2:31 PM