Troubleshooting Guide: SQL Server Error 8515 – MS DTC Global State Is Not Valid
Why This Error Happens
Error 8515 occurs when SQL Server attempts to execute a distributed transaction, but the Microsoft Distributed Transaction Coordinator (MS DTC) service is either not running, not properly configured, or cannot communicate due to security/network restrictions. This is commonly caused by the DTC service being disabled, network DTC access being turned off, or firewall rules blocking the RPC ports required for distributed transaction coordination between servers.
Step-by-Step Resolution Guide
Step 1: Verify and Start the MS DTC Service
- Open Run (Win + R) and type
services.msc. - Locate Distributed Transaction Coordinator in the services list.
- Ensure the Startup Type is set to
Automatic. - Right-click and select Start if the service is not running.
- Alternatively, use PowerShell:
Start-Service -Name MSDTC
Step 2: Enable Network DTC Access
- Open Component Services by typing
dcomcnfgin the Run dialog. - Navigate to:
Component Services > Computers > My Computer > Distributed Transaction Coordinator > Local DTC. - Right-click Local DTC and select Properties.
- Under the Security tab, check the following boxes:
Network DTC AccessAllow Remote Clients(if applicable)Allow InboundandAllow OutboundEnable XA Transactions(if using cross-platform transactions)- Click Apply, then restart the MSDTC service when prompted.
Step 3: Configure Windows Firewall Rules
- Open Windows Defender Firewall with Advanced Security.
- Create an Inbound Rule and Outbound Rule to allow
msdtc.exe(typically located atC:\Windows\System32\msdtc.exe). - Ensure RPC port 135 is open for both inbound and outbound traffic.
- If using a fixed port for DTC, configure it via registry at:
HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\DCOM Protocols
Step 4: Synchronize DTC Settings Across Servers
- If this is a distributed transaction between two SQL Server instances, repeat Steps 1–3 on both the local and remote servers.
- Confirm that both servers can resolve each other via DNS or hostname.
- Restart the SQL Server service on both instances after DTC changes are applied.
Alternative or Verification Steps
- Run
DTCPingor the built-in DTC Tester tool (Component Services > Local DTC > right-click > Properties > Tracing) to confirm connectivity between servers. - If the issue persists, check the Windows Event Viewer (Application and System logs) for specific MSDTC-related errors (Event ID 4097 or 4098) to pinpoint configuration mismatches.