Troubleshooting Guide: SQL Server Error 11320 – “Cannot create a User Parallel Nested Transaction”
Why This Error Happens
This error occurs when an application attempts to initiate a parallel nested transaction within a session that SQL Server 2025’s transaction engine does not support in the current execution context. It is commonly triggered by distributed transaction coordinators (MSDTC) misconfigurations, incompatible connection pooling settings, or legacy client drivers attempting to spawn nested transactions on a connection that is already enlisted in an active transaction. Corrupted session state or an outdated OLE DB/ODBC driver can also cause the transaction manager to reject the nested request.
Step-by-Step Resolution Guide
Step 1: Verify MSDTC Service Configuration
- Open Component Services (
dcomcnfg.exe) on Windows Server 2025 / Windows 11. - Navigate to Component Services > Computers > My Computer > Distributed Transaction Coordinator > Local DTC.
- Right-click Local DTC, select Properties, and ensure “Network DTC Access” and “Allow Inbound/Outbound” transactions are enabled.
- Restart the MSDTC service via
services.mscor by runningnet stop msdtc && net start msdtcin an elevated Command Prompt.
Step 2: Update SQL Server Client Drivers and Connection Strings
- Check that your application is using the latest Microsoft OLE DB Driver for SQL Server or ODBC Driver 18+, as older drivers mishandle nested transaction calls.
- Review the connection string and remove or correct any flags like
Enlist=truecombined with manualBEGIN DISTRIBUTED TRANSACTIONcalls when not needed. - Update drivers via the Microsoft Download Center or through
winget upgrade Microsoft.SQLServerDriversif using Windows Package Manager.
Step 3: Review and Refactor Application Transaction Logic
- Inspect application code (e.g., .NET
TransactionScope, JDBC, or raw T-SQL) for instances of nestedBEGIN TRANcalls on sessions already inside a parallel/distributed transaction. - Replace nested transaction attempts with savepoints (
SAVE TRANSACTION savepoint_name) instead of a secondBEGIN TRANSACTION. - Ensure only one top-level transaction coordinator (either local or distributed) is managing the session at a time.
Step 4: Restart SQL Server Services and Clear Session Cache
- Open SQL Server Configuration Manager and restart the SQL Server (MSSQLSERVER) service to clear any corrupted session states.
- Run
DBCC FREESESSIONCACHEandDBCC FREEPROCCACHEin SQL Server Management Studio (SSMS) to purge stale execution plans tied to the failed transaction.
Alternative or Verification Steps
- To verify the fix, run a test transaction batch with nested
SAVE TRANSACTIONcalls in SSMS and confirm no Error 11320 appears in the SQL Server Error Log (Management > SQL Server Logs). - If the issue persists, as an alternative, disable distributed transaction enlistment entirely in the application’s connection pool settings and manage transactions manually at the application layer using explicit
COMMIT/ROLLBACKlogic.