Using distributed transaction support

The IBM® i Access for Windows client supports Microsoft Transaction Server (MTS) and the Component Services model, with the IBM i Access ODBC driver, the IBMDASQL OLE DB provider, and the DB2® for IBM i .NET provider.

About this task

MTS

MTS is a Microsoft component-based programming model and run-time environment for developing, deploying, and managing Internet server applications. In many three-tier environments, Active Server Pages (ASP) call MTS components to access databases, mainframe applications, and message queues. Used with IBM i Access for Windows running in the middle-tier of a three-tier environment, MTS components manage transactions between client applications, IBM i Access for Windows components, and the databases involved in the transactions.

MTS uses Microsoft Distributed Transaction Coordinator (MSDTC) in order to manage transactions that span multiple Database Management Systems (DBMS), and to ensure two-phase commit integrity when dealing with transactions whose implementations depend on mutual success.

Start of changeIn newer Windows server models, MTS has been replaced with the Component Services model. The IBM i Access for Windows ODBC, OLE DB, and .NET providers support the Component Services model in the same manner as they support MTS.End of change

Implementation notes

  • If the MSDTC cannot load the IBM i Access ODBC driver, the SQLSetConnectAttr( SQL_ATTR_ENLIST_IN_DTC ) will fail with reason code of 2 (XaRmCreate failed).
  • If you are using SSL, or any other configurable value on the Connections > Properties dialog in IBM i Navigator, your system connection name in System i® Navigator must match the connection name specified on the client PC managed by MTS. MSDTC uses the same connection names as IBM i Access for Windows ODBC client PCs managed by MTS to connect to the DB2 for i database. To change the connection properties of the MSDTC connections, you must change the system account registry.

    One way to do this is to use Incoming Remote Command (IRC) in combination with the CWBENV utility:

Procedure

  1. Run CWBENV on a client PC to extract the configuration information for an environment.
  2. Copy the resulting file to the MSDTC PC.
  3. Start the IBM i Access for Windows Remote Command service and ensure that it is configured to run in the Local System context.
  4. Using the RUNRMTCMD command from a PC5250 session, send a CWBENV command to the MSDTC PC to import the environment.

    See the User's Guide in the IBM i Access for Windows program group for more information on these functions.

Results

For more information about MTS or the Component Services model, refer to the Microsoft Web site.