Supporting XA Transactions
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.
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).
Configuring the DTC to support XA transactions
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).
To configure the DTC to support Oracle transactions
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).
Install Oracle9i Client. To install Oracle9i Client, see Oracle9i Database Downloads (http://go.microsoft.com/fwlink/?linkid=84591).
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).
Enable XA transactions in the DTC. For more information, see article 817066 in the Microsoft Knowledge base (http://go.microsoft.com/fwlink/?linkid=94422).
Using Regedit.exe, ensure that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL contains the following entry:
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:
For Oracle9i Client: Using Regedit.exe, ensure that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI contains the following entries:
Enable network access for the DTC through Windows Firewall.
Fore more information, see Enable Firewall Exceptions for MS DTC.
Article 301293 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?linkid=94423)
Article 244661 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?linkid=94424)
Article 264012 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?linkid=94425)
Article 193893 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?linkid=94426)
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.
To enable XA transactions
Open the Component Services snap-in.
To open Component Services, click Start. In the search box, type dcomcnfg, and then press ENTER.
In the console tree, expand the DTC (such as Local DTC) for which you want to enable XA transactions.
On the Action menu, click Properties.
Click the Security tab.
Select the Enable XA Transactions check box.
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.
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.