Last updated

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

Nodinite guarantees data integrity and secures the outcome of operations using the Microsoft Distributed Transaction Coordinator (Windows Service) that ships with Windows Server. You must therefore enable and configure the Microsoft Windows Distributed Transaction coordinator for 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 pre 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 this role is pre-installed.

How do I configure the DTC service?

  • Click Start, click Run, type dcomcnfg and then click OK to open Component Services
  • 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 dialog 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 messagebox 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

On Microsoft Windows Fail over Cluster the MSDTC service may be clustered in many different cluster roles. These settings must be repeated on each instance

Increase port range

The default range for MSDTC depends on 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 a to small range. 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 radio button to Decimal and type 50000 in the value data, click OK.
  7. Restart the MSDTC Service (if stand-alone) or take the MSDTC Resource offline/online in the 'Failover Cluster Manager' if it's clustered

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

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 Fail over Cluster the MSDTC service may be clustered in many different cluster roles. These settings must be repeated on each instance

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

You must as a 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 use the DTCPing.exe tool.


Next Step

Install Nodinite

Web Client
Log Agents