Troubleshooting Guide: Error 3965 – PROMOTE TRANSACTION Request Failed
Why This Error Happens
This error occurs when application code calls PROMOTE TRANSACTION (escalating a local transaction to a distributed transaction via MSDTC) without an active local transaction context present on the connection. It commonly happens due to improper transaction scoping in application code, connection pooling issues that reset the session state, or a mismatch between TransactionScope objects and the underlying connection lifecycle in .NET applications. It can also surface when MSDTC (Microsoft Distributed Transaction Coordinator) is misconfigured or the security context between SQL Server 2025 and the client does not permit transaction propagation.
Step-by-Step Resolution Guide
Step 1: Verify Local Transaction Context in Application Code
- Confirm that a
BEGIN TRANSACTIONor an activeTransactionScopeexists before any operation that triggers promotion (e.g., opening a second connection within the same scope). - Review ORM or driver code (ADO.NET, JDBC, ODBC) to ensure the connection isn’t closed or returned to the pool before the transaction is promoted.
- Check for asynchronous code paths where the transaction context may be lost across
awaitcalls.
Step 2: Validate and Restart MSDTC Service
- Open
services.mscon Windows Server 2025 / Windows 11 and confirm Distributed Transaction Coordinator is set to Automatic and is running. - Restart the service via PowerShell:
Restart-Service -Name MSDTC -Force
- Run
dtcpingordcomcnfg.exeto validate DTC connectivity between the application server and the SQL Server instance.
Step 3: Reconfigure MSDTC Security Settings
- Open
dcomcnfg.exe→ Component Services → Computers → My Computer → Distributed Transaction Coordinator → Local DTC → Properties → Security tab. - Enable Network DTC Access, Allow Inbound/Outbound, and set authentication to Mutual Authentication Required (or No Authentication Required only in trusted internal networks).
- Apply changes and restart the MSDTC service for the settings to take effect.
Step 4: Check SQL Server Configuration and Firewall Rules
- Confirm TCP port 135 (RPC) and the dynamic DTC port range are open between the application server and SQL Server 2025 host.
- Use
sys.dm_tran_active_transactionsandsys.dm_tran_session_transactionsDMVs on SQL Server to confirm no orphaned sessions are interfering with transaction state. - Ensure the SQL Server service account has the necessary rights to interact with MSDTC (
Log on as a serviceand DCOM launch permissions).
Alternative or Verification Steps
- Re-run the failing transaction after restarting MSDTC and confirm success by checking Event Viewer → Applications and Services Logs → MSDTC for clean promotion events (no Event ID 3965 recurrence).
- If the issue persists, bypass automatic promotion by explicitly using a single connection and local transaction (
SqlTransactioninstead ofTransactionScopespanning multiple connections) to avoid unnecessary escalation to a distributed transaction.