Supporting XA Transactions

Updated: April 11, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator (MS DTC) DTC can act as either an XA-compliant resource manager or as a transaction manager. When the DTC acts as an XA-compliant resource manager, it allows SQL Server, Message Queuing (also known as MSMQ), and other OLE transactions-compliant resource managers to participate in transactions that are controlled by X/Open DTP XA-compliant transaction processing monitors.

In the DTC, you can view the superior XA transaction identifier (XID) for the transaction manager in the Component Services snap-in. (Right-click the transaction in the Transaction List dialog box, and then view the properties.) You can use the XID to resolve any in-doubt transactions in the DTC that have an XA transaction manager as a superior. For the subordinate XA transaction manager, you can use the Transactions List to determine the outcome of the transaction and force the outcome for the corresponding transaction on the subordinate XA transaction manager.

noteNote
Before you resolve the transaction manually, try to reconnect the XA transaction manager with the DTC so that the transaction managers can attempt to resolve the transactions automatically through recovery.

When the DTC acts as an XA-compliant transaction manager, Oracle, IBM DB/2, Sybase, Informix, and other XA-compliant resource managers can participate in transactions that the DTC controls. When the DTC displays information for transactions that span XA-compliant resource managers, the DTC does not display the XID of the transaction. Instead, it displays the OLE Transactions Unit of Work identifier (UOW) for the transaction.

You can use Component Services for the XA-compliant resource manager to correlate transactions in the DTC.

For more information, see "XA Specification" at The Open Group (http://go.microsoft.com/fwlink/?linkid=94419).

You can use this procedure to configure the DTC to support Oracle transactions. This procedure enables the DTC to serve as the transaction coordinator for any distributed transactions between an installed Oracle client and database servers running Oracle.

Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (http://go.microsoft.com/fwlink/?LinkId=83477).

  1. Install MDAC 2.8 Service Pack 1 (SP1) or later. To install MDAC 2.8 SP1, see the Microsoft Download Center (http://go.microsoft.com/fwlink/?linkid=37282).

  2. Install Oracle9i Client. To install Oracle9i Client, see Oracle9i Database Downloads (http://go.microsoft.com/fwlink/?linkid=84591).

  3. Ensure that the Network service account has Read access to the Oracle Client dynamic-link libraries (DLLs). For more information, see article 816633 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?linkid=94428).

  4. Enable XA transactions in the DTC. For more information, see article 817066 in the Microsoft Knowledge base (http://go.microsoft.com/fwlink/?linkid=94422).

  5. Using Regedit.exe, ensure that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL contains the following entry:

    MTXOCI=C:\WINDOWS\system32\mtxoci.dll

  6. For Oracle Client 8.1.7: Using Regedit.exe, ensure that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI contains the following entries:

    "OracleXaLib"="oraclient8.dll"

    "OracleSqlLib"="orasql8.dll"

    "OracleOciLib"="oci.dll"

  7. For Oracle9i Client: Using Regedit.exe, ensure that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI contains the following entries:

    "OracleXaLib"="oraclient9.dll"

    "OracleSqlLib"="orasql9.dll"

    "OracleOciLib"="oci.dll"

  8. Enable network access for the DTC through Windows Firewall.

    Fore more information, see Enable Firewall Exceptions for MS DTC.

The use of XA transactions is disabled by default to prevent the potential of security risk that arises when a user-specified DLL, which the DTC uses to communicate with the XA partner's transaction manager, is loaded directly into the DTC process. This situation can expose a resource manager's databases to serious data corruption. It can also cause denial-of-service attacks. To allow the coordination and flow of XA transactions, you have to enable XA transactions.

  1. Open the Component Services snap-in.

    To open Component Services, click Start. In the search box, type dcomcnfg, and then press ENTER.

  2. In the console tree, expand the DTC (such as Local DTC) for which you want to enable XA transactions.

  3. On the Action menu, click Properties.

  4. Click the Security tab.

  5. Select the Enable XA Transactions check box.

  6. Click OK.

In addition to enabling XA transactions, you may also have to enable DTC access through a firewall, such as Windows Firewall, if one exists. For more information, see Enable Firewall Exceptions for MS DTC.

noteNote
If you enable XA transactions and you want to disable them, first ensure that no transactions are currently in progress. The disabling of XA transactions prevents the DTC from communicating the status of in-doubt transactions. To avoid this outcome, you must either manually forget the transaction, using the DTC UI, or briefly enable distributed transactions to perform automatic recovery. For more information about forgetting transactions manually, see Resolve Transactions Manually.

XA transactions are disabled by default on domain controllers.

Community Additions

ADD
Show: