Why DTCTester always fails on windows Server 2008 Cluster even DTCPing test succeeds

Symptom

Suppose we have a windows server 2008 cluster and a clustered SQL instance. We have a dedicated MSDTC resource (DTC1), and another DTC resource (DTC2) in SQL group as well . No matter DTCPing test to the DTC1 or DTC2, or WINRM test to DTC1 or DTC2, we always succeed.

While we use DTCTester.exe to simulate a distributed transaction with Clustered SQL resource involved, we always get failed due to an exception saying “ MSDTC on server ‘###’ is unavailable”.

Possible Cause and Resolution

In terms of our case, we find the culprit is that the Clustered SQL resource and the DTC resource is not mapped correctly.

To verify if the SQL resource and DTC resource are mapped correctly and list all the mappings, we can run this command in the command window:

  • Msdtc -tmmappingview *

 

The mapped SQL resource and DTC resource should look as below in the register:

 

We should be able to get a result like below screenshot if the mapping is correct:

Otherwise, we will get a result as below:

 If you find the issue is really caused by incorrect mapping, you can try below command to map the SQL resource and DTC resource:

  • Msdtc –tmMappingSet –name <Descriptive Mapping Name> –service <service being mapped with DTC resource> –ClusterResourceName <DTC resource name>

For example, we can map a Clustered SQL instance named :SQL01 with a DTC resource named DTC01, and the descriptive mapping name is “MappingDemo” with below command:

  • Msdtc –tmMappingSet –name MappingDemo –service SQL01 –ClusterResourceName DTC01

 

 

References

  1. How to Configure Multiple Instances of Distributed Transaction Coordinator (DTC) on a Windows Server Failover Cluster 2008

https://blogs.technet.com/b/askcore/archive/2009/02/18/how-to-configure-multiple-instances-of-distributed-transaction-coordinator-dtc-on-a-windows-server-failover-cluster-2008.aspx

    2. MSDTC communication is not working on a Windows 2008 and R2 Cluster using Incoming Caller Authentication

https://support.microsoft.com/default.aspx?scid=kb;en-US;2172085

   3. How to enable diagnostic tracing for MS DTC on a Windows Vista-based computer

https://support.microsoft.com/kb/926099/en-us

   4. Map Clustered MS DTC Resources

https://technet.microsoft.com/en-us/library/cc742483(WS.10).aspx

Renhe from Microsoft APAC DSI TEAM