About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
SQL Server raises error 8501 when a statement needs the Microsoft Distributed Transaction Coordinator (MS DTC) and SQL Server cannot use it. Microsoft lists it with severity 16 and the message text MSDTC on server '%.*ls' is unavailable. The server name replaces the placeholder. Work through four checks in order: whether the local DTC service is started, whether its network settings allow transactions, whether the firewall path is open between the two computers, and whether each computer can resolve the other's name.
What the error means
A distributed transaction is one that spans more than one server. Microsoft documents that BEGIN DISTRIBUTED TRANSACTION makes the instance the transaction originator, and that MS DTC manages the completion across all instances involved. A local transaction can also be promoted automatically. Microsoft says a distributed query run in a local transaction is promoted when the target OLE DB source supports ITransactionLocal, and a remote stored procedure call starts a distributed transaction when remote proc transaction promotion is on, which is its default.
That means an application that never wrote BEGIN DISTRIBUTED TRANSACTION can still reach DTC through a linked server. Error 8501 is not event-logged according to the error list, so look at the client, the job output, or the SQL Agent history for it.
The other DTC errors in the same list have different text. Error 8502 says an unknown token was received from MS DTC, 8509 says the import of an MS DTC transaction failed, and 8510 says an enlist operation failed. Use their own text rather than treating them as 8501.
Version scope: Microsoft's MsDtc module pages carry only a Windows Server 2025 documentation selector and list no earlier releases, so confirm each cmdlet exists on your Windows Server version before relying on it. Microsoft's pages do not say which single cause produces 8501 rather than a network-level error, so the checks below separate the causes by what they show.
Because DTC runs on both computers, run each check on the SQL Server that raised the error and on the computer it was calling. A setting that is fine on one side does not help if the other side blocks the transaction.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The local DTC service is not started | The DTC instance status is not Started | Get-Dtc shows Status |
| Network DTC settings block inbound or outbound transactions | InboundTransactionsEnabled or OutboundTransactionsEnabled is False |
Get-DtcNetworkSetting |
| The firewall rules for DTC are off, or ports between the computers are blocked | A DTC firewall rule is disabled, or a transaction does not propagate | Get-NetFirewallRule for the DTC group (below), then Test-Dtc once the rules are enabled |
| A computer cannot resolve the other's name | Name lookups fail from one side | Microsoft: DTC needs each computer to resolve the other by NetBIOS or DNS |
Prove the cause before changing anything
Run these on both computers. They read settings.
Get-Dtc
Get-DtcNetworkSetting -DtcName "Local"
Microsoft's example for Get-Dtc shows the properties DtcName, Status, VirtualServerName and endpoint IDs. Status shows Started in the example. Get-DtcNetworkSetting returns AuthenticationLevel, InboundTransactionsEnabled, OutboundTransactionsEnabled, RemoteClientAccessEnabled, RemoteAdministrationAccessEnabled, XATransactionsEnabled and LUTransactionsEnabled. The page gives no default values for current Windows versions, so record what you see rather than assuming.
Read the state of the DTC firewall rules without changing them. This lists the rules in the group that are administratively disabled, using the -DisplayGroup and -Enabled parameters that Microsoft documents for Get-NetFirewallRule; no output means none is disabled.
Get-NetFirewallRule -DisplayGroup "Distributed Transaction Coordinator" -Enabled False
Next, on the SQL Server, see which linked servers promote transactions. Microsoft states that remote proc transaction promotion is on by default, so a value of 1 is the default and does not by itself explain error 8501; it shows which linked servers can start a distributed transaction.
SELECT name, product, is_linked, is_remote_proc_transaction_promotion_enabled
FROM sys.servers;
Test-Dtc is not a read-only first step. Microsoft's page says you must first enable the firewall rule for Distributed Transaction Coordinator on both computers before running it, and that enabling is the change in cause 3 below. Once the rules are enabled, Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -Verbose checks the firewall rules and the network security settings, and prints them. Microsoft's examples show the warning text Inbound transactions are not allowed and this computer cannot participate in network transactions. when inbound transactions are off.
Risk: the two-computer form, Test-Dtc -LocalComputerName ... -RemoteComputerName ... -ResourceManagerPort 17100, starts a test resource manager that listens on that TCP port, needs the port open in the firewall, and opens a PowerShell session to the remote computer. Microsoft's description says it tests propagation of a transaction between the computers. Use it in a quiet period and close the port afterwards if it was not open before.
Last, test name resolution both ways with ping using the computer names. Microsoft's firewall page states that the client must resolve the server's name and the server must resolve the client's name.
How to read the results:
- Status other than Started: cause 1.
- Inbound or outbound False on either side: cause 2.
- A rule listed by the
Get-NetFirewallRulecommand above: cause 3. - Settings fine, rules enabled, but the transaction does not propagate: cause 3 (a blocked port) or cause 4.
Fix
Cause 1: start the local DTC.
Start-Dtc -DtcName "Local"
Risk: this starts the DTC instance. To back out, stop the Distributed Transaction Coordinator service from the Services console. If it will not start, the Windows System and Application logs on that computer show why.
Cause 2: allow network transactions. Use -WhatIf first, which the cmdlet supports.
Set-DtcNetworkSetting -DtcName "Local" -InboundTransactionsEnabled $true -OutboundTransactionsEnabled $true -WhatIf
Disruptive step: without -WhatIf the command applies the change, and Microsoft states that Set-DtcNetworkSetting "also restarts the DTC instance". Transactions in flight on that DTC are affected. To back out, set the values you recorded from Get-DtcNetworkSetting. Change only the values the check showed to be wrong. AuthenticationLevel accepts NoAuth, Incoming or Mutual; compare the value on both computers and change it only when you know the application needs it.
Cause 3: open the firewall path. Microsoft's Test-Dtc page gives this command for the DTC rule group:
Enable-NetFirewallRule -DisplayGroup "Distributed Transaction Coordinator"
Disruptive step: this enables inbound firewall rules on that computer. To back out, disable the same rule group again in Windows Firewall; Microsoft's page gives only the enable command.
Microsoft says DTC uses RPC dynamic port allocation by default, in the 49152 to 65535 range, plus port 135, the RPC Endpoint Mapper port. It recommends a fixed DTC port or the default range in firewalls, and custom RPC ports only if firewalls cannot filter on computer or IP address. For a fixed port, its page says the firewall must be open in both directions for the fixed port and port 135. A fixed port is set with a registry value:
reg add HKLM\SOFTWARE\Microsoft\MSDTC /v ServerTcpPort /t REG_DWORD /d 40001 /f
Disruptive step: this is a registry edit on every computer in the transaction, and Microsoft tells you to back up the registry first. The page does not say when the value takes effect, so plan a DTC service restart. To back out, delete the ServerTcpPort value.
Disruptive step: opening the fixed port and port 135 in both directions changes firewall rules on both computers and widens what can reach them. To back out, remove the rules you added. Record the existing rules first.
Cause 4: name resolution. Fix DNS records or the NetBIOS setting so each computer resolves the other's name. Microsoft says that if NetBIOS cannot resolve the names, you add entries to the LMHOSTS files on the computers.
Risk: a DNS record or LMHOSTS entry changes how that computer, and every application on it, resolves the name. A wrong entry sends traffic to the wrong computer. Copy the existing LMHOSTS file or note the old record first and restore it to back out.
Optional change, not a cause: stop a linked server promoting remote procedure calls. Microsoft states that remote proc transaction promotion is on by default for every linked server, so it does not explain an 8501 on its own. Change it only if the application owner confirms the remote procedure does not need a distributed transaction:
EXECUTE sp_serveroption N'sql02', 'remote proc transaction promotion', N'false';
Disruptive step: this changes transaction behaviour. A call to the remote procedure no longer runs inside a distributed transaction, so the two servers' work is no longer committed or rolled back together. Do not do it unless the application owner agrees. To back out, set the option back to true.
Confirm the fix
Run Get-Dtc and Get-DtcNetworkSetting again on both computers. Then run Test-Dtc between them as above. Microsoft's example output reports Transaction propagated from ... using PULL propagation and ... using PUSH propagation on success. Finally, repeat the statement that raised error 8501.
Example (illustrative): sql01 (10.0.20.11) calls a procedure on sql02 (10.0.20.12) through a linked server, both in 10.0.20.0/24. The call fails with 8501. Get-DtcNetworkSetting on sql02 shows InboundTransactionsEnabled : False. After the setting is changed, the call fails again; Get-NetFirewallRule -DisplayGroup "Distributed Transaction Coordinator" -Enabled False on sql02 lists the DTC rules as disabled, so the group is enabled. The network team then fixes the DTC port at 40001 on both computers, as in Microsoft's registry example, and opens 40001 and port 135 in both directions between the two addresses. The call succeeds.
What to watch afterwards
- Record
Get-DtcNetworkSettingoutput for each SQL Server in your build notes, so a rebuilt server can be matched to it. - After moving servers between networks, test again, and confirm which firewall profile each network connection now uses.
- Alert on SQL Agent job failures that mention distributed transactions.
Read next
Related articles you may want next.
- Backup & RecoverySQL Server's service master key: linked servers, credentials and new hardwareWhat SQL Server's service master key protects, how key recovery differs from recreating server objects, and what to check before a rebuild.Read article
- TroubleshootingFirewall Rules Stopped After a Move? Check the ProfileServices refused after a Windows server move? Read each connection's network category, trace why domain detection failed and fix that, not the rules.Read article
- TroubleshootingSQL Kerberos After Migration: Check SPNs and NTLM UseTrace client names, SQL service identities and SPNs to explain failed Kerberos authentication after migration without weakening authentication.Read article
Risks and limits
These commands have not been run or lab-tested. Microsoft's pages do not give default DTC settings for current Windows versions and do not list error 8501's causes, so the order above is a way to separate causes, not a ranking. Registry edits, firewall rule changes and DTC restarts affect every application that uses DTC on the computer. Do not change DTC security settings on a production server without a recorded back-out.
Sources
- Database Engine events and errors 8000 to 8999 (errors 8501, 8502, 8509, 8510) — Microsoft Learn, page dated 2026-10-27, accessed 18 November 2026
- BEGIN DISTRIBUTED TRANSACTION (Transact-SQL) — Microsoft Learn, page dated 2026-07-20, accessed 18 November 2026
- sp_serveroption (Transact-SQL) — Microsoft Learn, page dated 2026-06-22, accessed 18 November 2026
- sys.servers (Transact-SQL) — Microsoft Learn, page dated 2026-07-20, accessed 18 November 2026
- Test-Dtc (MsDtc) — Microsoft Learn, date not shown, accessed 18 November 2026
- Get-Dtc (MsDtc) — Microsoft Learn, date not shown, accessed 18 November 2026
- Get-DtcNetworkSetting (MsDtc) — Microsoft Learn, date not shown, accessed 18 November 2026
- Set-DtcNetworkSetting (MsDtc) — Microsoft Learn, date not shown, accessed 18 November 2026
- Start-Dtc (MsDtc) — Microsoft Learn, date not shown, accessed 18 November 2026
- Get-NetFirewallRule (NetSecurity) — Microsoft Learn, date not shown, accessed 18 November 2026
- Configure Distributed Transaction Coordinator (DTC) to work through a firewall — Microsoft Learn, page dated 2026-02-12, accessed 18 November 2026
This article was originally published on .