MSDTC – How to Cluster
Sometimes you need to cluster MSDTC as a resource in a Windows Failover Cluster. This post will describe how to do it.
TL;DR
- Create a storage dedicated for DTC in the failover cluster.
- Create a cluster role for MSDTC.
- Configure MSDTC.
Index
- Check CID before Clustering
- Create shared storage disk in Windows Failover Cluster
- Configure MSDTC as a cluster role
- Configure MSDTC
- Configure Ports for DTC
- Move Clustered MSDTC Role
- Summary
Check CID before Clustering
Well, the CIDs must be different on the node you are going to cluster the MSDTC service.
You can find the CID in the registry under: <Computer\HKEY_CLASSES_ROOT\CID> Open the folder CID and you will see four SID values, those are the CIDs.
Info. Open the registry by: Start-> type: regedit-> enter.
Here are the values in node 1 (my-sql01):
Info. I think CID.Local is for Windows 2008.
Here are the values in node 2 (my-sql01):
If you have cloned the images of the servers, you might end up with the same CID, this might cause trouble later.
Note. After you have clustered the DTC, the CIDs will be the same? I’m unsure about this process, see this post for more info: https://www.raspberryfield.life/2019/04/28/about-msdtc-and-troubleshooting-it/ [2019-04-29]
Back to Index.
Create shared storage disk in Windows Failover Cluster
MSDTC needs its own disk in the failover cluster. You can read more about disks in clusters and how to create them here:
- Add Shared Storage to Failover Cluster (iSCSI vhdx) https://www.raspberryfield.life/2019/04/15/add-shared-storage-to-failover-cluster-iscsi-vhdx/ [2019-04-16]
- Shared Storage with iSCSI https://www.raspberryfield.life/2019/04/08/shared-storage-with-iscsi/ [2019-04-16]
Once the disk is configured and brought online, it should look something like this in the Failover cluster manager:
Back to Index.
Configure MSDTC as a cluster role
Right click Roles in Failover Cluster Manager:
High Availability Wizard will start:
Select Distributed Transaction Coordinator (DTC):
Give the clustered service a NetBIOS name and an IP address:
Select a storage volume:
Confirmation:
After the clustering of MSDTC has finished, you will see that it shows up as a Role in the failover cluster wizard:
You will also see that the role is registered in the AD:
Back to Index.
Configure MSDTC
Start-> type: Component Services.
These are the configurations recommended for BizTalk:
Note, Set these settings for both the local and clustered DTC.
Finally, make sure that the Service Distributed Transaction Coordinator is set to Startup Type Automatic:
(Start-> type: Services, to open Services.)
Note! After MSDTC is clustered. The CID Values
Back to Index.
Configure Ports for DTC
Default port range for DTC communication is 49152-65535. You will need a minimum of 200 ports in BizTalk.
Here is how to configure the port range:
Open Component Services:
Add the port range:
When done, it will look like this:
Back to Index.
Move Clustered MSDTC Role
When I clustered MSDTC in this post, I did it in its own cluster role. However, this might work but it can also be a good idea to assign it to the SQL cluster role instance. In this scenario, the clustered DTC service is tighter bound to the clustered SQL role it is meant to support.
Here is how to assign a cluster role to another (right click on the resource in the Resource tab):
After you clicked Assign to Another Role… a window will pop up and you can make your choice there:
Summary
In a HA (High Availability) clustered SQL setup, you might want to cluster the DTC service. This post gives an example how to practically do it.
Back to Index.