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

Troubleshooting Guide: SQL Server Error 5846 — CLR Execution Not Supported Under Lightweight Pooling

Why This Error Happens

This error occurs because SQL Server’s “lightweight pooling” feature uses fiber-mode scheduling instead of standard Windows threads, and the Common Language Runtime (CLR) cannot execute reliably within a fiber-mode context. When both the clr enabled and lightweight pooling server configuration options are set to 1 simultaneously, SQL Server detects this incompatibility and raises Error 5846 to prevent instability or crashes. This is a configuration conflict rather than a corruption or permissions issue, and it typically surfaces when a DBA enables CLR integration (for SQLCLR assemblies, custom functions, or triggers) on an instance that was previously tuned for high-concurrency workloads using fiber mode.

Step-by-Step Resolution Guide

Step 1: Confirm the Current Configuration State

  • Open SQL Server Management Studio (SSMS) or a query tool connected to the affected instance on Windows Server 2025 / Windows 11.
  • Run the following T-SQL to check both settings:
  EXEC sp_configure 'show advanced options', 1;
  RECONFIGURE;
  EXEC sp_configure 'lightweight pooling';
  EXEC sp_configure 'clr enabled';
  • Verify in the run_value column whether both options return 1 (enabled), which confirms the conflict.

Step 2: Disable Lightweight Pooling (Recommended Fix)

  • Since lightweight pooling (fiber mode) offers minimal benefit on modern multi-core hardware and is deprecated in newer SQL Server builds, disable it in favor of keeping CLR functional.
  • Execute:
  EXEC sp_configure 'lightweight pooling', 0;
  RECONFIGURE;
  • Note: This setting requires a full SQL Server service restart to take effect — it cannot be applied dynamically.
  • Restart the service via SQL Server Configuration Manager or by running:
  Restart-Service -Name "MSSQLSERVER" -Force

(replace MSSQLSERVER with your named instance, e.g., MSSQL$INSTANCENAME, if applicable).

Step 3: Alternative — Disable CLR Instead (If Fiber Mode Is Required)

  • If your workload genuinely depends on lightweight pooling for legacy COM+ or specific high-concurrency scenarios, disable CLR instead:
  EXEC sp_configure 'clr enabled', 0;
  RECONFIGURE;
  • This change applies immediately without a service restart, unlike the lightweight pooling setting.
  • Confirm no active SQLCLR objects (assemblies, CLR stored procedures, or CLR triggers) are in use before disabling, as they will fail post-change.

Step 4: Validate SQL Server Error Log

  • After applying either fix and restarting (if required), check the SQL Server Error Log for confirmation messages.
  • Navigate to the default log path: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG (adjust version folder for SQL Server 2025).
  • Look for a clean startup with no recurrence of Error 5846 and confirm CLR or fiber-mode status messages align with your intended configuration.

Alternative or Verification Steps

  • Re-run EXEC sp_configure 'lightweight pooling'; and EXEC sp_configure 'clr enabled'; to confirm only one of the two shows run_value = 1.
  • If CLR functionality is critical and you cannot disable lightweight pooling due to a restart restriction in a production environment, schedule the restart during a maintenance window and use sp_configure with WITH OVERRIDE only as a last resort for emergency configuration changes.