- 7 minutes to read

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

Nodinite can guarantee 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 and so on. 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 and the coding magic behind this is further outlined in the 'Transaction Class' page.

Are there any prerequisites?

Yes, if you are on previous Windows 2016 Windows Servers, you need to first 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 on the Security tab
  • Check the Network DTC Access checkbox
  • Check the Allow Remote Clients checkbox
  • Check the Allow Inbound and "Allow Outbound" checkboxes
  • Click on the Apply button, then on the OK button
  • A message box will be displayed with a 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 MSDTC, depends on the Windows version, and also during the many years in service different companies and "experts/consultants/it-operations-teams/..." have policies or templates in place... Anyway, usually the port range is often to narrow and in combination with other Windows default settings (registry values), 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 states that MSDTC should use 5000-5020 which is problematic.

  • For starters the range is extremely limited, 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
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC
  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 'Failover 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 MSDTC 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 MSDTC service should be clustered in all roles with a SQL Server instance used with Nodinite.

The MSDTC 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, from the server manager tool, enable the 'Distributed Transactions' server role. You will find this feature in the 'Application Server' part of the tree.

  1. Enable the 'Application Server' role
  2. Enable everything for the 'Distributed Transactions' role
    MSDTC
    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 node act as the server, anf if succesful, 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 for SQL Servre Always-on; the listener name(s)
  • From the Nodinite Web Client, make a test by changing the description for a User, and click Save

Next Step

Install Nodinite

Web Client
Log Agents