How to fix Error 3989 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 3989 — “New request is not allowed to start because it should come with valid transaction descriptor”

Why This Error Happens

This error occurs when a distributed or marked transaction becomes orphaned or invalid on the SQL Server session, typically because the client application attempted to reuse a transaction descriptor after the original transaction was aborted, timed out, or the connection pool returned a stale enlisted transaction. It frequently surfaces after MSDTC (Microsoft Distributed Transaction Coordinator) communication failures, abrupt network interruptions during a distributed transaction, or when connection pooling hands back a connection still bound to a dead transaction context. In some cases, corrupted or mismatched MSDTC configuration between the application server and SQL Server 2025 instance on Windows Server 2025 triggers this behavior.

Step-by-Step Resolution Guide

Step 1: Verify and Restart MSDTC Service

  • Open Services.msc on both the SQL Server host and the application server.
  • Locate Distributed Transaction Coordinator, right-click, and select Restart.
  • Confirm the service is set to Automatic startup type to prevent recurrence after reboot.
  • Run msdtc -resetlog from an elevated Command Prompt if the service fails to start cleanly.

Step 2: Reconfigure MSDTC Security Settings

  • Open Component Services (dcomcnfg.exe) → Component Services > Computers > My Computer > Distributed Transaction Coordinator > Local DTC.
  • Right-click Local DTC, choose Properties, and go to the Security tab.
  • Enable Network DTC Access, Allow Inbound, Allow Outbound, and set Transaction Manager Communication to No Authentication Required (or Mutual Authentication if domain policy requires it).
  • Apply changes and restart the MSDTC service when prompted.

Step 3: Audit Application Connection Pooling and Transaction Handling

  • Review application code for any SqlConnection or ADO.NET objects that reuse a TransactionScope after it has been disposed or timed out.
  • Ensure Enlist=true is correctly set in the connection string only when distributed transactions are intended.
  • Reduce Connection Lifetime in the connection string to force pooled connections to recycle more frequently, preventing stale transaction descriptors from being reused.

Step 4: Update SQL Server 2025 Cumulative Updates

  • Check SQL Server Configuration Manager for the current build version.
  • Download and apply the latest Cumulative Update (CU) from Microsoft, as transaction descriptor handling bugs are periodically patched.
  • Reboot the server after installation and confirm via SELECT @@VERSION; in SQL Server Management Studio (SSMS).

Step 5: Review SQL Server Error Logs and Extended Events

  • Open SSMS and navigate to Management > SQL Server Logs.
  • Search for correlating Error 3989 entries alongside any MSDTC or network-related warnings.
  • Set up an Extended Events session tracking sqlserver.error_reported filtered on Error 3989 to capture the exact query/session triggering the fault for deeper diagnosis.

Alternative or Verification Steps

  • Verify the fix by running a test distributed transaction (e.g., BEGIN DISTRIBUTED TRANSACTION) from both an SSMS query window and the application layer, confirming it commits/rolls back without triggering Error 3989.
  • If the issue persists, as a workaround, disable connection pooling temporarily (Pooling=false in the connection string) to isolate whether the descriptor corruption originates from pooled connection reuse versus a genuine MSDTC/network failure.