How to rebuild or move a MSDTC installation to be used with a SQL failover cluster
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:
Rebuild MSDTC on the SQL Server failover clustered serverImportant 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:
- Switch all services to Manual mode. However, do not touch the following services (if present):
- 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
- 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
- TCP/IP NetBIOS Helper
- Time Service
- Windows Management Instrumentation Driver Extensions
- Windows Time Service
- 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.
- 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.
- In the registry, remove the following keys if they exist: HKEY_CLASSES_ROOT\CIDHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTCHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSDTCHKEY_LOCAL_MACHINE\SYSTEM\ControlSet0\Services\MSDTCHKEY_LOCAL_MACHINE\SYSTEM\ControlSet1\Services\MSDTCHKEY_LOCAL_MACHINE\SYSTEM\ControlSet2\Services\MSDTCHKEY_LOCAL_MACHINE\SYSTEM\ControlSet3\Services\MSDTC
Note The number of ControlSets will vary by system.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
- 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.
- 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 serversProblem
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.
- 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.
- 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".
- From the Cluster Administrator, right-click the MSDTC cluster resource and select OFFLINE.
- Right-click the MSDTC cluster resource, and then click Properties.
- In the Properties dialog box, click DEPENDENCY, and then click the MODIFY button.
- Select the newly created MSDTC resources (MSDTC Network Name and IP Address) as dependencies, and then click ADD.
- Select any existing SQL Server clustered resources listed as dependencies, and then click REMOVE.
- Click OK, and then click OK again.
- Right-click the MSDTC resource and select to bring the resource back online, and then test failover.
- 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 groupBy 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.
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
- 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.
- Create the following resources in the destination group of your choice; the SQL Server group, for example:
- MSDTC TCP/IP Address, dependent on the drive where you want DTC to be created.
- MSDTC Network Name, dependent on the MSDTC TCP/IP address.
- Distributed Transaction Coordinator Resource, dependent on the MSDTC Network Name.
- 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.
- At a command prompt, type comclust on node A. After this completes, repeat this step on node B.
- 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.
- Bring all MSDTC resources online.
If you are a Windows Server 2003 user, see the following article in the Microsoft Knowledge Base:
Article ID: 294209 - Last Review: 08/21/2007 16:18:09 - Revision: 10.2
- kbinfo KB294209