- 8 minutes to read

Learn how to configure the Microsoft Distributed Transaction Coordinator (MSDTC) Windows Service

Nodinite guarantees the data integrity and the outcome of client-server operations using the Microsoft Distributed Transaction Coordinator (Windows Service) that ships with Windows Server.

You must enable and configure the Microsoft Windows Distributed Transaction coordinator for use with Nodinite as detailed on this page.

The Distributed Transaction Coordinator (DTC) service coordinates transactions that update transaction-protected resources, such as databases, message queues, BizTalk Server etc. These transaction-protected resources may be contained on a single system or distributed across your network. Nodinite is built on many Enterprise-grade services and can scale, with the only limit being your money.

Microsoft has detailed the MSDTC Windows Service in the following Technet article. The coding is further outlined on the 'Transaction Class' page.

Are there any prerequisites?

Yes, if you are on previous Windows 2016 Windows Servers, you need first to enable the 'Distributed Transactions' server role detailed in the 'How do I add the Server Role on Windows 2012 and Windows 2012 R2 Server?' section further down on this page.

On Windows 2016 and later, this role is pre-installed.

How do I configure the DTC service?

Regardless of the type of SQL Server installation (stand-alone, fail-over cluster or SQL Server Always-on), ALL DTC services must be configured as described below on all SQL Server nodes, and Nodinite application servers.

  • Open Component Services, for example, click on the Start button, click Run, type 'dcomcnfg', and then click OK
  • In the console tree, expand Component Services, click to expand Computers, click to expand My Computer, click to expand Distributed Transaction Coordinator and then click Local DTC
  • Right-click on the Local DTC entry and then right-click for Properties to display the Local DTC Properties dialogue box
  • Click the Security tab
  • Check the Network DTC Access checkbox
  • Check the Allow Remote Clients checkbox
  • Transaction Manager Communication
    • Check the "Allow Inbound" and "Allow Outbound" checkboxes
    • No Authentication required
  • If you are using IBM products, please check the Use XA Transactions
  • Click the Apply button, then on the OK button
  • A message box displays the message that the service will be restarted
  • Click the OK button
    Component Services
    Configuration of the MSDTC as Nodinite requires.

If your Windows Server is installed with fail-over cluster and is running SQL Server, the MSDTC service should be clustered in all roles with a SQL Server instance.

TCP port range

The default range of allowed TCP ports for use with MS DTC depends on the Windows version. During the many years in service different companies and "experts/consultants/it-operations-teams/..." have policies or templates in place... Anyway, the port range is often too narrow combined with other Windows default settings (registry values), and the number of available ports during run-time will be exhausted. Review the following user guides for additional information:

It is worth noting that, by default MS DTC uses dynamic ports. The default dynamic port ranges for Windows are as follows:

Windows Version Default Port range
Windows Server 2003 1024-65535
Windows Server 2008- 49152-65535

However, many articles on the Internet state that MS DTC should use 5000-5020, which is problematic.

  • For starters, the range is extremely limited, with only 20 ports
  • The range is not even in the defaults for Windows, regardless of version...

Change port range

  1. Start a Command Prompt and enter the following command: dcomcnfg
  2. Expand "Component Services" and find "My Computer"
  3. Right-click "My Computer" and select "Properties"'
  4. Select the "Default Protocols" tab, highlight "Connection-oriented TCP/IP" and click "Properties"
  5. Add a range, for example, '50000-50200'

Even 200 ports may be to narrow. Make sure to perform additional registry tweaks to improve the usage of TCP ports on the Windows Servers.

Change listening start port

Before you change anything, please review the following external online articles first:

You should only proceed with changing the default listening port if you have failed to resolve connection-/transaction-related problems diagnosing first with the event viewer and the DTC ping tool

  1. Start Regedt32.exe
  3. Right-click the MSDTC key, select New and DWord (32-bit) Value
  4. Type ServerTcpPort for the key name
  5. Right-click ServerTcpPort key and select Modify
  6. Change the radio button to Decimal and type 50000 in the Value data field, then click on the 'OK' button.
  7. Restart the MSDTC Service (if stand-alone) or take the MSDTC Resource offline/online in the 'Fail-over Cluster Manager' if it's clustered

for Clustered instances of DTC you need to change MSDTC instance-specific registry settings (HKEY_LOCAL_MACHINE\Cluster\Resources\{Unique_DTC_ResourceID_GUID}\MSDTCPRIVATE\MSDTC)`(verify with all nodes)

Confirm correct port usage

  1. Open an Administrative command prompt and run 'Netstat –ano' to get the start port and the Process Identifier (PID)
  2. Start Task Manager and select the 'Details' tab
  3. Find MSDTC.exe and get the PID(s) - can and should be multiple for clustered instances
  4. Review and validate the output for the PID to show MSDTC is using the correct port range

Do repeat the MS DTC configuration changes EQUALLY on ALL servers for ALL MSDTC instances, local, and clustered:

  • SQL Server instances
    • BizTalk
    • Nodinite
  • BizTalk Processing nodes
  • Nodinite App and Web Servers

Further reading

You should now review the following articles:

Fail-over Cluster

If your Windows Server is installed with fail-over cluster and is running SQL Server, the MS DTC service should be clustered in all roles with a SQL Server instance used with Nodinite.

The MS DTC is installed in Each SQL Server Resource Group (every role).

  • This option provides the best performance and isolation. It guarantees that your instance of MSDTC will always run on the same physical node as the SQL Server, which reduces communications overhead.
  • Make sure to add a dependency that SQL Server does not start, before the clustered DTC resource has started
  • Make sure to configure the clustered DTC with the settings detailed earlier on this page

MSDN - MSDTC Recommendations on SQL Failover Cluster

On which Windows Servers do I need to configure the MSDTC Windows Service?

On all Windows servers and (Application Servers and SQL Servers/Instances) where Nodinite Core Services are installed.

On SQL Server with Failover Cluster, review the Fail-over Cluster paragraph.

How do I add the Server Role on Windows 2012 and Windows 2012 R2 Server?

As the local administrator; Use the server manager tool to enable the 'Distributed Transactions' server role. This feature is available in the 'Application Server' part of the tree.

  1. Enable the 'Application Server' role
  2. Enable everything for the 'Distributed Transactions' role
    Required server role 'Distributed Transactions' enabled

Frequently asked questions

How do I troubleshoot Microsoft DTC firewall issues?

You should first download and install the Microsoft DTCPing.exe tool.

Vital Test Steps

  • Make sure to perform tests for both directions, e.g. where the application server acts as the client and the SQL Server node act as the server, and if successful, in reverse
    • If you have multiple SQL nodes, you need to repeat this step for all combinations between the client and the server
  • Make sure to test with node names and, if applicable, for fail-over cluster name(s) or SQL Server Always-on; the listener name(s)
  • From the Nodinite Web Client, make a test by changing the description for a User and clicking Save

The local MS DTC detected that the MS DTC on %Server Name% has the same unique identity as the local MS DTC

If you see the following error in the Windows Event Log:

The local MS DTC detected that the MS DTC on %Server Name% has the same unique identity as the local MS DTC...

The Root Cause for this problem is most likely due to an existing virtual machine being cloned. By creating a clone, the Id of the DTC Service is Not unique.

To resolve the problem; Reinstall the MS DTC service. By doing so, a new Id is created for the MS DTC Service.

You need to be a member of the local administrators´ group to perform the actions listed below.

  1. At the command prompt, type msdtc -uninstall, and then press the ENTER key.
  2. At the command prompt, type msdtc -install, and then press ENTER key.
  3. Optionally if problems are still reported; Restart all Windows Servers that were part of the failing distributed transaction chain. Usually the following Windows Servers:
    • BizTalk Server processing nodes
    • BizTalk Server nodes where the ENTSSO service is installed
    • SQL Server nodes
    • Nodinite Application Server
    • Nodinite SQL Nodes

Next Step

Install Nodinite

Web Client
Log Agents