Disaster Recovery for MSDTC on Windows Server 2003 and 2008
You may experience serious problems with the Microsoft Distributed Transaction Coordinator (MSDTC) service. All attempts to troubleshoot MSDTC have not fixed the issue. You can follow these disaster recovery instructions on a standalone machine or a cluster node to reinstall the MSDTC service. For clusters these instructions will reinstall the local MSDTC service. After reinstalling MSDTC, you can reconfigure the MSDTC cluster resource using Cluster Administrator for Windows 2003 or Failover Cluster Management for Windows 2008.
During installation of MSDTC the default behavior for both Windows Server 2003 and 2008 is that if the registry key/hive exists, then it is left alone and not reverted to the clean-install state. If you are resetting MSDTC for disaster recovery purposes, we recommend deleting these hives to make sure the system will be reset to the clean install state. Otherwise you can leave these hives untouched to preserve user settings. Sometimes you need to reboot the machine after performing these steps to make it work.
To reinstall MSDTC on Windows 2003, perform the following steps:
Stop the Distributed Transaction Coordinator service in the Services Control Panel
At a command prompt run "msdtc -uninstall" without quotes. This removes the MSDTC service from the Services Control Panel and the associated service hive along with the CIDs from the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSDTC
HKEY_CLASSES_ROOT\CIDSkip this step if you want to preserve existing configuration, such as network transactions and other MSDTC security settings. Otherwise export the MSDTC Setup subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Setup and manually delete the following registry keys if they exist:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSDTC
HKEY_CLASSES_ROOT\CID
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTCAt a command prompt run "msdtc -install" without quotes. This reinstalls the MSDTC service and the 3 registry hives above. Note the MSDTC Setup subkey is not populated on Windows 2003.
Import the saved MSDTC Setup registry hive file (.reg) if you completed step 3 earlier:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Setup
At a command prompt run “msdtc –resetlog” without quotes
To reconfigure the MSDTC cluster resource after these steps on Windows Server 2003, please read these articles:
How to configure Microsoft Distributed Transaction Coordinator on a Windows Server 2003 cluster
Understanding MS DTC Resources in Windows Server 2003 Failover Clusters
To reinstall MSDTC on Windows 2008, perform the following steps:
Stop the Distributed Transaction Coordinator service in the Services Control Panel
At a command prompt run "msdtc -uninstall" without quotes. This removes the MSDTC service from the Services Control Panel and the associated service hive along with the CIDs and CID.Locals from the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSDTC
HKEY_CLASSES_ROOT\CID
HKEY_CLASSES_ROOT\CID.LocalSkip this step if you want to preserve existing configuration, such as network transactions and other MSDTC security settings. Otherwise manually delete the following registry keys if they exist:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSDTC
HKEY_CLASSES_ROOT\CID
HKEY_CLASSES_ROOT\CID.Local
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTCAt a command prompt run "msdtc -install" without quotes. This reinstalls the MSDTC service and the 4 registry hives above.
At a command prompt run “msdtc –resetlog” without quotes
To reconfigure the MSDTC cluster resource after these steps on Windows Server 2008, please read these articles:
How to Configure Multiple Instances of Distributed Transaction Coordinator (DTC) on a Windows Server Failover Cluster 2008
Understanding MS DTC Resources in Windows Server 2008 Failover Clusters
Comments
Anonymous
July 30, 2009
This was great - didn't find this on any other MS site( wonder why) .... Thank's !Anonymous
August 03, 2009
We had some old articles (KB279786 and KB891801). During Windows Server 2008 development, we revisited the installation procedure and came up with this updated documentation. We didn't write a KB article because there was a question not answered. Recently I tested the procedures and I answered the question myself. No question left so I just published it as a blog. It is easy and quick.Anonymous
September 14, 2009
I executed the uninstall, the removal of the registry keys and the install on Windows 2008 server. Did not work for me. I am now getting an error Event 4427, MSDTC. "Failed to initialize the needed name object" hr=0x80004005. Any help would be great. tyghp@msn.comAnonymous
September 14, 2009
Does the error occur during the install? Please post the complete the errror message in the event log and take a look at dtcinstall.log under C:Windows.Anonymous
July 20, 2010
Just what i needed! Thanks a million!Anonymous
November 13, 2014
Still working in 2014! NB I needed a reboot afterwards. Thanks