About Microsoft Data Transaction Coordinator (DTC)
MSDTC (or DTC) is a
Microsoft service that is used by SQL and other applications when two (or more)
machines each need to do part of some work and both must succeed or no changes
are made. The common scenario is that machine
1 starts a transaction (“Distributed Transaction”), and does some work, then
connects to machine 2 that also does some work. The work can go back and forth. If either machine fails then everything in the transaction is cancelled
and no changes are made. PypeServer does not determine when a
Distributed Transaction is required. This is handled by SQL. Empirically, it is often required when multiple changes must be made to
the database in an all-or-nothing manner. This prevents the database from being corrupted if only a portion of the
changes are made and something goes wrong, or if one of the machines fails to
do its part. Distributed Transactions
are essential to data integrity and are used in all types of SQL transactions
where even one mistake can cause problems.
What can go wrong during a Distributed Transaction?
- The computer could be powered down or crash.
- The logic of the processing could become
impossible. For example in pipe
importing a part may lack sufficient data, or the data does not logically
define a part.
- The processing could encounter bad file
formatting.
DTC only starts when a Distributed Transaction is
required. A PypeServer user may have no
problem performing many tasks because no distributed transactions are required. Distributed Transactions are commonly required
in both importing and nesting.
Note: The use of the DTC is not optional. The Distributed Transactions must be used to ensure data integrity in SQL
client-server transactions.
Configuration
The Distributed Transaction Coordinator is a core Windows network service and must be running on both the SQL Server and
the remote seat to support Distributed Transactions when requested. Please see The Microsoft Network Stack for a background on DTC and networking.
DTC at the SQL Server
DTC support is installed and starts on boot at the
Kiosk computer which usually is the SQL Server. This allows remote (network client) DTC services to establish
Distributed Transactions with the PypeServer SQL Server.
At a Remote Seat (client system)
When PypeServer is installed on a remote seat, DTC is
installed (if it is not there) and is set to Automatic start at startup. Firewall ports are also opened to allow DTC
to reach out past its own local firewall to establish Distributed Transactions
with the PypeServer computer.
· DTC could have been uninstalled or turned off by
some company security configurations
· DTC can be blocked by the firewall by company
security configurations. See Configuring
MSDTC and Troubleshooting sections below.
· It is possible that network routers may also
block DTC communications to the server.
Configuring MSDTC
Configure MSDTC
- From Start,
search for dcomcnfg and press Enter on
your keyboard.
- Expand
the nodes in the Console pane to locate the DTC (e.g.
Local DTC).
- Right-click
the DTC then click Properties.
- Click
the Security tab.
- Under Security
Settings, select the Network DTC Access
- Under Transaction
Manager Communication, select the Allow Inbound and Allow
Outbound checkboxes.
- Under Transaction
Manager Communication, click the No Authentication
Required radio button.
- Select
the Enable XA Transactions checkbox.
- Click OK.
Using PowerShell
- Right-click on the Start Menu and select "Windows PowerShell (Admin)".
- Select your configuration below and paste the script into the PowerShell window and execute it.
Kiosk/SQL Server

Set-DtcNetworkSetting -AuthenticationLevel "NoAuth" -InboundTransactionsEnabled $true -OutboundTransactionsEnabled $true -LUTransactionsEnabled $true -RemoteClientAccessEnabled $true -XATransactionsEnabled $true
Remote Seat

Set-DtcNetworkSetting -AuthenticationLevel "NoAuth" -InboundTransactionsEnabled $true -OutboundTransactionsEnabled $true -LUTransactionsEnabled $true -XATransactionsEnabled $true
Allow DTC through the firewall on both systems
netsh advfirewall firewall set rule group="Distributed Transaction Coordinator" new enable=yes
Enable-NetFirewallRule -DisplayGroup "Distributed Transaction Coordinator"
Note: It’s recommended that you review your Windows
Firewall exceptions to avoid any DTC issues. Though system and security
settings will vary, you can investigate the appropriate exceptions by going
to Control Panel > Windows Firewall > Allow apps to communicate
through Windows Firewall and to review the exceptions for Distributed
Transaction Coordinator.
Troubleshooting
Some general issues to consider before using diagnostic tools in an investigation are:
- The DTC service could have been uninstalled or turned off by some company security configurations.
- DTC communications can be blocked by the firewall by company security configurations.
- DTC access permissions may not be set correctly to allow users to access the remote server.
If there are additional network and security rules required
in order for the service to communicate, there are a number of Microsoft tools
that can help your team troubleshoot some common issues.
Here are some
for DTC problems:
HealthCheck
The Enterprise HealthCheck tool provides a DTC check that will check access permissions, execute a synthetic nested DTC transaction, and report a pass/fail result. It also can attempt to reset the DTC access rights to a PypeServer supported configuration. It also allows one to run the Test-Dtc tool below.
The PowerShell cmdlet Test-Dtc tests whether two computers
can participate in networked transactions. Here’s the link to tool use, examples and
related links. This tool provides a lot of detail regarding where the failure is occurring.