Microsoft KB Archive/294209

= How to rebuild or move a MSDTC installation to be used with a SQL failover cluster =

Article ID: 294209

Article Last Modified on 8/21/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 6.5 Enterprise Edition
 * Microsoft SQL Server 7.0 Enterprise Edition
 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Developer Edition

-



This article was previously published under Q294209



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SUMMARY
This article describes how to rebuild a broken Microsoft Distributed Transaction Coordinator (MSDTC) installation for use with a failover clustered SQL Server installation, and how to move the MSDTC clustered resource to a new group.

Microsoft only supports running MSDTC on cluster nodes as a clustered resource. We do not recommend or support running MSDTC in stand-alone mode on a cluster. Using MSDTC as a non-clustered resource on a Windows cluster is problematic. This configuration is problematic because transactions could be orphaned and you may experience data corruption if a cluster failover occurs.

Note These procedures should be performed directly on the computers being used, not through any type of remote connection.

Note The information in this article does not apply to Microsoft Windows Server 2003. For Microsoft Windows Server 2003-based systems, see the following article in the Microsoft Knowledge Base:

301600 How to configure Microsoft Distributed Transaction Coordinator on a Windows Server 2003 cluster



Rebuild MSDTC on the SQL Server failover clustered server
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  Switch all services to Manual mode. However, do not touch the following services (if present):  Alerter Cluster Service Computer Browser Distributed File System Distributed Link Tracking Client</li> Distributed Link Tracking Server</li> DNS Client</li> Event Log</li> IPSEC Policy Agent</li> License Logging Service</li> Logical Disk Manager</li> Messenger</li> Net Logon</li> NTLM Security Support Provider</li> Network Connectors</li> Plug and Play</li> Process Control</li> Remote Procedure Call (RPC) Locator</li> Remote Procedure Call (RPC) Service</li> Remote Registry Service</li> Removable Storage</li> <li>Security Accounts Manager</li> <li>Server</li> <li>Spooler</li> <li>TCP/IP NetBIOS Helper</li> <li>Time Service</li> <li>Windows Management Instrumentation Driver Extensions</li> <li>Windows Time Service</li> <li>Workstation</li></ul>

Note Some installations may not have all these services, because this list covers both Microsoft Windows NT 4.0 Enterprise Edition, and Microsoft Windows 2000 Advanced Server.</li> <li>Close Control Panel and restart the server. This clears the memory of DLLs loaded by services; otherwise, these services remain in memory and hold locks on system resources.</li> <li>If you are using Windows NT 4.0, run msdtc -remove on all nodes. If you are using Windows 2000, run msdtc -uninstall on all nodes.</li> <li>In the registry, remove the following keys if they exist:

Note The number of ControlSets will vary by system.</li> <li>Remove the Z:\MSDTCLog directory, where Z is the cluster disk where this directory currently resides.

Warning If you have active logs and noncommitted transactions that you have to preserve, do not do this. Do not continue; contact your SQL Server support professional for additional instructions.</li> <li>Delete the following files on both nodes of the cluster if you are using Windows NT 4.0. You can skip this step for Windows 2000 installations. <ul> <li>Adme.dll</li> <li>Dac.exe</li> <li>Dacdll.dll</li> <li>Dtccfg.cpl</li> <li>Dtccm.dll</li> <li>Dtctrace.dll</li> <li>Dtctrace.exe</li> <li>Dtcxatm.dll</li> <li>Dtcuic.dll</li> <li>Dtcuis.dll</li> <li>Dtcutil.dll</li> <li>Enudtc.dll</li> <li>Logmgr.dll</li> <li>Msdtc.exe</li> <li>Msdtc.dll</li> <li>Msdtcprx.dll</li> <li>Mtxclu.dll</li> <li>Msdtctm.dll</li> <li>Svcsrvl.dll</li> <li>Xolehlp.dll</li></ul>

Note The default behavior is that MSDTC will install to the first group that contains a valid IP address resource, Network Name resource and Physical Disk resource. If SQL Server 7.0 is already clustered and is the first group to meet this criteria, MSDTC will use the first resources it finds in that group. These may be SQL Server resources or MSDTC resources.

You can find the MSDTC setup on the SQL Server Service Pack 2 CD in the \x86\Other folder listed as Dtcsetup.exe, which should be your source on Windows NT 4.0 systems. Windows 2000 systems should use the Dtcsetup.exe file from the %systemroot%\System32 folder; this would generally be your Winnt\System32 folder.

Warning Before you run Dtcsetup.exe, verify that node 1 has control of all the clusters' resource groups.</li> <li>Run Dtcsetup.exe on the first node; this copies these files to the %windir%/System32 folder.

Warning When the Dtcsetup.exe program completes, read the screen carefully. Do not click OK until you read the message carefully. Dtcsetup.exe might require you to perform this same step on the other node before you click OK.

Note For Microsoft Windows 2000, run Dtcsetup.exe on the other nodes of the cluster only if you are prompted to run it after you run Dtcsetup.exe on first node.</li> <li>When prompted to run Dtcsetup.exe on the second node, do so. If Dtcsetup.exe completes without any messages on the first node, continue to run it on the second node.

Note You may want to check the event viewer to make sure that Dtcsetup.exe is successful on each node.

Warning Do not move any cluster resources. If you move any resource, or experience a failover during this process, you must start it over.</li> <li>After you have clicked the OK button on the second node's installation, you can then click OK on the first node, and restart any computers as the installation requires.</li> <li>Windows 2000 users only: From the first node where you ran Dtcsetup.exe, open a command prompt, type comclust.exeand then click Enter. After this step completes on the first node, repeat this step on the other node.</li> <li>Verify that the DTCLOG folder has been created on the cluster disk. By default, the MSDTC service starts with a local system account. This local system account should have full permissions to the DTCLOG folder.</li></ol>

Steps to reset MSDTC back to a typical installation on SQL Server 6.5 and SQL Server 7.0 virtual servers
Problem

To reinstall MSDTC without unclustering SQL Server, Dtcsetup.exe was run. The IP address or Network Name is used. During this process, the user has no control over the dependencies for the MSDTC cluster resource if it is in the same group as the instance of SQL Server.

If the MSDTC resource is in another group, other than where SQL Server is installed, this does not apply.

Resolution
 * 1) Create a cluster IP address resource for the MSDTC, name it &quot;MSDTC IP ADDRESS&quot;, and assign it a unique IP address. This must be a real IP address (not one just made up). After successful creation, bring the resource online.
 * 2) Create a cluster Network Name resource, name it &quot;MSDTC Network Name&quot;, and make it dependent on the MSDTC IP ADDRESS. Use a unique name such as &quot;CLUSTDTC&quot;.
 * 3) From the Cluster Administrator, right-click the MSDTC cluster resource and select OFFLINE.
 * 4) Right-click the MSDTC cluster resource, and then click Properties.
 * 5) In the Properties dialog box, click DEPENDENCY, and then click the MODIFY button.
 * 6) Select the newly created MSDTC resources (MSDTC Network Name and IP Address) as dependencies, and then click ADD.
 * 7) Select any existing SQL Server clustered resources listed as dependencies, and then click REMOVE.
 * 8) Click OK, and then click OK again.
 * 9) Right-click the MSDTC resource and select to bring the resource back online, and then test failover.
 * 10) To make sure that all the system files are correct, we suggest that Windows 2000 users use the Windows 2000 File Checker to verify system files. To do this, type sfc /scannow at a command prompt.

Note Have your Windows 2000 CD and your Windows 2000 Service Pack CD available; if inconsistencies are found, you will need the CD.

Moving the MSDTC resource in a specific group
By default, the MSDTC resources are installed differently, depending on the operating system.

Windows NT 4.0

MSDTC installs the clustered MSDTC to the first group that contains a valid IP address resource, Network Name resource, and cluster disk resource. This is typically the SQL Server group.

Windows 2000

When you want to move MSDTC into the SQL Server group in the SQL Server 6.5 and SQL Server 7.0 fellover cluster, refer to the &quot;Steps to reset MSDTC back to a typical installation on SQL Server 6.5 and SQL Server 7.0 virtual servers&quot; section of this article.

Steps to move the MSDTC resource <ol> <li>Start Cluster Administrator. Delete all resources created for Windows NT 4.0; these would typically be MSDTC, MSDTC Network Name, and MSDTC IP address.

Note By default, Windows 2000 installs MSDTC to the cluster group resource and will only require you to delete the MSDTC resource after taking it offline.</li> <li>Create the following resources in the destination group of your choice; the SQL Server group, for example: <ol style="list-style-type: lower-alpha;"> <li>MSDTC TCP/IP Address, dependent on the drive where you want DTC to be created.</li> <li>MSDTC Network Name, dependent on the MSDTC TCP/IP address.</li> <li>Distributed Transaction Coordinator Resource, dependent on the MSDTC Network Name.</li></ol> </li> <li>Do one of the following: <ul> <li>Move the existing Dtclog folder from the original drive to the new drive.</li> <li>Delete the original Dtclog folder and create a folder named Dtclog on the drive (the same as step 2) on where you want MSDTC to be installed.</li></ul> </li> <li>At a command prompt, type comclust on node A. After this completes, repeat this step on node B.</li> <li>Run msdtc -resetlog from a command prompt on node A.

Warning The msdtc -resetlog command is a dangerous operation; verify that you do not have active transactions when you perform this operation.</li> <li>Bring all MSDTC resources online.</li></ol>

Windows Server 2003

If you are a Windows Server 2003 user, see the following article in the Microsoft Knowledge Base:

301600 How to configure Microsoft Distributed Transaction Coordinator on a Windows Server 2003 cluster

Additional query words: MSCS

Keywords: kbinfo KB294209

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.