Troubleshooting Guide: SQL Server Error 3922 – “Cannot Enlist in the Transaction Because the Transaction Does Not Exist”
Why This Error Happens
This error typically occurs when a distributed transaction has already been committed, rolled back, or has timed out before a secondary session or linked server attempts to enlist in it. It is commonly triggered by MSDTC (Microsoft Distributed Transaction Coordinator) communication failures between Windows Server 2025 and client/linked server nodes, or by a mismatch in transaction timeout settings. Corrupted MSDTC logs or improperly configured network DTC access can also cause the coordinator to lose track of an active transaction context.
Step-by-Step Resolution Guide
Step 1: Verify and Restart the MSDTC Service
- Open Services.msc on Windows Server 2025 / Windows 11.
- Locate Distributed Transaction Coordinator, right-click, and select Restart.
- Confirm the service is set to Automatic startup type to prevent recurrence after reboot.
Step 2: Reconfigure Network DTC Access
- Open Component Services (
dcomcnfg.exe). - Navigate to Component Services > Computers > My Computer > Distributed Transaction Coordinator > Local DTC.
- Right-click Local DTC, select Properties, and go to the Security tab.
- Enable Network DTC Access, Allow Inbound, Allow Outbound, and set authentication to Incoming and Outgoing Caller Authentication Required.
- Apply changes and restart the MSDTC service when prompted.
Step 3: Check Firewall and Port Configuration
- Ensure Windows Firewall allows traffic on RPC dynamic port range and port 135 for MSDTC communication.
- Run the following PowerShell command to confirm the rule is enabled:
Get-NetFirewallRule -DisplayGroup "Distributed Transaction Coordinator"
- If disabled, enable it using:
Enable-NetFirewallRule -DisplayGroup "Distributed Transaction Coordinator"
Step 4: Adjust Transaction Timeout Settings in SQL Server
- Open SQL Server Management Studio (SSMS).
- Review application-level
SET XACT_ABORT ONandBEGIN DISTRIBUTED TRANSACTIONlogic to ensure timeouts align with MSDTC settings. - Increase the transaction timeout value in the application connection string if transactions are timing out prematurely.
Step 5: Rebuild Corrupted MSDTC Logs (If Issue Persists)
- Stop the MSDTC service.
- Navigate to
C:\Windows\System32\MSDtc\and rename the MSDTC folder to MSDTC_old. - Restart the server to allow Windows to regenerate the MSDTC log files automatically.
Alternative or Verification Steps
- Run a test distributed transaction between the two servers using
BEGIN DISTRIBUTED TRANSACTIONin SSMS and confirm it commits without raising Error 3922. - If the issue persists, use the DTCPing tool (compatible with Windows Server 2025) to diagnose connectivity issues between the involved servers at the MSDTC level.