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

  1. Create a storage dedicated for DTC in the failover cluster.
  2. Create a cluster role for MSDTC.
  3. Configure MSDTC.

Index

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):

CID node1

Info. I think CID.Local is for Windows 2008.

Here are the values in node 2 (my-sql01):

CID node2

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:

Once the disk is configured and brought online, it should look something like this in the Failover cluster manager:

Shared Disk MSDTC

Back to Index.

Configure MSDTC as a cluster role

Right click Roles in Failover Cluster Manager:

configure cluster role

High Availability Wizard will start:

cluster role wizard

Select Distributed Transaction Coordinator (DTC):

select cluster role

Give the clustered service a NetBIOS name and an IP address:

NetBIOS name

Select a storage volume:

cluster disk select

Confirmation:

confirmation

After the clustering of MSDTC has finished, you will see that it shows up as a Role in the failover cluster wizard:

Sumamry HA wizard

You will also see that the role is registered in the AD:

AD cluster role

Back to Index.


Configure MSDTC

Start-> type: Component Services.

These are the configurations recommended for BizTalk:

configure MSDTC

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.)

Services Start up Type

Note! After MSDTC is clustered. The CID Values in the registry will be the same. However, the Local DTC (CID.Local) should be unique values between the nodes (?).

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:

Component services port range

Add the port range:

set port range

When done, it will look like this:

port range set

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):

assign to role

After you clicked Assign to Another Role… a window will pop up and you can make your choice there:

assign to role

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.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.