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

Troubleshooting Guide: Error 2820 – Feature Not Enabled on SQL Server Instance

Why This Error Happens

Error 2820 occurs when a SQL Server feature (such as Change Data Capture, Policy-Based Management, or a specific Database Engine feature) has not been activated at either the instance or database level before an operation attempts to use it. This typically happens because the feature requires an explicit stored procedure call (like sys.sp_cdc_enable_db) or a configuration setting via sp_configure that was never executed during setup. It can also occur if the SQL Server edition in use (e.g., Standard vs. Enterprise) does not support the specific feature being invoked, or if the feature was disabled during a migration from an older instance.

Step-by-Step Resolution Guide

Step 1: Identify the Specific Feature Being Blocked

  • Check the full error message text where %.*ls resolves to the actual feature name (e.g., “Change Data Capture” or “FileStream”).
  • Run the following query to review the error log for context:
  EXEC sp_readerrorlog 0, 1, 'Error: 2820';
  • Confirm the SQL Server 2025 edition using SELECT SERVERPROPERTY('Edition'); to rule out licensing restrictions.

Step 2: Enable the Feature at the Instance Level

  • For features controlled by sp_configure (like CLR integration or Filestream access level), run:
  EXEC sp_configure 'show advanced options', 1;
  RECONFIGURE;
  EXEC sp_configure '<feature_name>', 1;
  RECONFIGURE;
  • For Filestream specifically on Windows Server 2025, open SQL Server Configuration Manager, navigate to SQL Server Services, right-click your instance, select Properties, and check the FILESTREAM tab to enable it at the OS level first.

Step 3: Enable the Feature at the Database Level

  • Some features (like Change Data Capture) require a database-specific activation command:
  USE YourDatabaseName;
  EXEC sys.sp_cdc_enable_db;
  • Verify the database compatibility level supports the feature using:
  SELECT compatibility_level FROM sys.databases WHERE name = 'YourDatabaseName';
  • If compatibility level is below 160 (SQL 2022) or the 2025 equivalent, update it with:
  ALTER DATABASE YourDatabaseName SET COMPATIBILITY_LEVEL = 170;

Step 4: Restart the SQL Server Service

  • Open Services.msc on Windows Server 2025 / Windows 11.
  • Locate SQL Server (MSSQLSERVER) or your named instance, right-click, and select Restart to apply the configuration changes.
  • Alternatively, use PowerShell:
  Restart-Service -Name 'MSSQLSERVER' -Force

Alternative or Verification Steps

  • Confirm the fix by re-running the original query or operation that triggered Error 2820; it should now execute without the feature-disabled message.
  • If the error persists, check Edition-specific feature support via Microsoft’s official “Features Supported by Editions of SQL Server 2025” documentation, as some features (e.g., Always Encrypted with secure enclaves) are exclusive to Enterprise or Developer editions and cannot be enabled on Standard edition regardless of configuration.