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

Article translations Article translations
Article ID: 294209 - View products that this article applies to.
This article was previously published under Q294209
Expand all | Collapse all

On This Page

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

MORE INFORMATION

Rebuild MSDTC on the SQL Server failover clustered server

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
  1. 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
    • Distributed Link Tracking Server
    • DNS Client
    • Event Log
    • IPSEC Policy Agent
    • License Logging Service
    • Logical Disk Manager
    • Messenger
    • Net Logon
    • NTLM Security Support Provider
    • Network Connectors
    • Plug and Play
    • Process Control
    • Remote Procedure Call (RPC) Locator
    • Remote Procedure Call (RPC) Service
    • Remote Registry Service
    • Removable Storage
    • Security Accounts Manager
    • Server
    • Spooler
    • TCP/IP NetBIOS Helper
    • Time Service
    • Windows Management Instrumentation Driver Extensions
    • Windows Time Service
    • Workstation
    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.
  2. 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.
  3. 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.
  4. In the registry, remove the following keys if they exist:

    HKEY_CLASSES_ROOT\CID

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSDTC

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet0\Services\MSDTC

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet1\Services\MSDTC

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet2\Services\MSDTC

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet3\Services\MSDTC


    Note The number of ControlSets will vary by system.
  5. 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.
  6. 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.
    • Adme.dll
    • Dac.exe
    • Dacdll.dll
    • Dtccfg.cpl
    • Dtccm.dll
    • Dtctrace.dll
    • Dtctrace.exe
    • Dtcxatm.dll
    • Dtcuic.dll
    • Dtcuis.dll
    • Dtcutil.dll
    • Enudtc.dll
    • Logmgr.dll
    • Msdtc.exe
    • Msdtc.dll
    • Msdtcprx.dll
    • Mtxclu.dll
    • Msdtctm.dll
    • Svcsrvl.dll
    • Xolehlp.dll
    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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.

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 "MSDTC IP ADDRESS", 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 "MSDTC Network Name" , and make it dependent on the MSDTC IP ADDRESS. Use a unique name such as "CLUSTDTC".
  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 "Steps to reset MSDTC back to a typical installation on SQL Server 6.5 and SQL Server 7.0 virtual servers" section of this article.

Steps to move the MSDTC resource
  1. 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.
  2. Create the following resources in the destination group of your choice; the SQL Server group, for example:
    1. MSDTC TCP/IP Address, dependent on the drive where you want DTC to be created.
    2. MSDTC Network Name, dependent on the MSDTC TCP/IP address.
    3. Distributed Transaction Coordinator Resource, dependent on the MSDTC Network Name.
  3. Do one of the following:
    • Move the existing Dtclog folder from the original drive to the new drive.
    • 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.
  4. At a command prompt, type comclust on node A. After this completes, repeat this step on node B.
  5. 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.
  6. Bring all MSDTC resources online.
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

Properties

Article ID: 294209 - Last Review: August 21, 2007 - Revision: 10.2
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
Keywords: 
kbinfo KB294209

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com