Platform SDK: Transaction Server

Mapping OLE Transactions to the XA Protocol

Microsoft Distributed Transaction Coordinator (MS DTC) provides a transaction coordination facility via the OLE Transactions protocol. This document describes how the OLE Transactions protocol can be mapped to the X/Open (XA) protocol.

OLE Transactions to XA Mapping via an XA TM

The shaded components in the previous illustration represent parts of MS DTC: the DTC Proxy, the XA transaction manager (TM), and the distributed transaction coordinator (DTC). The components marked as solid represent the resource manager (RM): the ODBC driver, and the RM itself.

An application gets new transactions by invoking the ITransactionDispenser interface offered by the DTC Proxy DLL, and it uses an ODBC driver to communicate with an RM such as SQL Server, DB2, Informix, and Oracle, among others. To get an ODBC connection to enlist on a DTC transaction, the application sets an attribute called SQL_ATTR_ENLIST_IN_DTC on that connection. An ODBC driver is DTC-compliant only if it accepts this attribute. Some resource managers are natively OLE Transactions-compliant, in which case the ODBC driver performs all necessary work for OLE Transactions. See the Resource Manager Implementation Guide for information about what ODBC drivers need to do to map the OLE Transactions protocol to the XA protocol.