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

Troubleshooting Guide: SQL Server 2025 Error 5864

Application: Microsoft SQL Server 2025
Operating System: Windows Server 2025 / Windows 11
Error Code: 5864
Symptom: IO affinity is not supported on this edition of SQL Server.

Why This Error Happens

SQL Server raises Error 5864 when the affinity I/O mask (or affinity64 I/O mask) advanced server configuration option has been set to a non-zero value, but the currently installed edition does not support the I/O affinity feature. This feature is only available on Enterprise Edition and Developer Edition. It is commonly seen after an instance is restored, migrated, or downgraded to Standard, Web, or Express edition while the configuration value from a prior Enterprise installation is still present in the configuration store (master database), causing the engine to reject the setting at startup or reconfiguration.

Step-by-Step Resolution Guide

Step 1: Confirm the Installed Edition

  • Open a query window in SQL Server Management Studio (SSMS) connected to the affected instance.
  • Run the following query to identify the current edition:
SELECT SERVERPROPERTY('Edition') AS Edition,
       SERVERPROPERTY('EngineEdition') AS EngineEditionID,
       SERVERPROPERTY('ProductVersion') AS ProductVersion;
  • Confirm whether the result is Standard Edition, Web Edition, or Express Edition. I/O affinity is not supported on any of these; only Enterprise Edition and Developer Edition allow a non-zero affinity mask.

Step 2: Identify the Current I/O Affinity Configuration

  • Enable advanced options so the setting is visible:
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
  • Query the current values of both the 32-bit and 64-bit I/O affinity masks:
EXEC sp_configure 'affinity I/O mask';
EXEC sp_configure 'affinity64 I/O mask';
  • Note the config_value and run_value columns. A non-zero value on an unsupported edition is the root cause of Error 5864.

Step 3: Reset the Unsupported I/O Affinity Setting

  • Set both the 32-bit and 64-bit affinity I/O mask options back to their default (disabled) value of 0:
EXEC sp_configure 'affinity I/O mask', 0;
EXEC sp_configure 'affinity64 I/O mask', 0;
RECONFIGURE;
  • Confirm the change is accepted without error, then optionally turn off advanced options visibility:
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;

Step 4: Restart the SQL Server Service

  • Restart the instance using one of the following supported methods:
  • SQL Server Configuration Manager: Open SQL Server Configuration Manager, select SQL Server Services, right-click the instance (e.g., SQL Server (MSSQLSERVER)), and choose Restart.
  • Windows Services console: Open services.msc, locate SQL Server (MSSQLSERVER) for a default instance or SQL Server (<InstanceName>) for a named instance, and restart it.
  • PowerShell (run as Administrator):
Restart-Service -Name 'MSSQLSERVER' -Force

For a named instance, use the mapped service name instead:

Restart-Service -Name 'MSSQL$<InstanceName>' -Force
  • Wait until the service status shows Running before proceeding.

Step 5: Review the SQL Server Error Log

  • Open the current error log, located by default at:
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG

(For a named instance, the path uses the instance ID, e.g., MSSQL17.<InstanceName>.)

  • Alternatively, review the log directly from SSMS under Management > SQL Server Logs > Current, or query it with:
EXEC sp_readerrorlog 0, 1, 'affinity';
  • Confirm there are no new occurrences of Error 5864 following the restart.

Alternative or Verification Steps

  • Verify the fix: Re-run the queries from Step 2 to confirm both affinity I/O mask and affinity64 I/O mask show a run_value of 0, and confirm no new Error 5864 entries appear in the error log reviewed in Step 5.
  • Alternative if the edition must support I/O affinity: If I/O affinity configuration is a business requirement, perform an edition upgrade to Enterprise Edition using the SQL Server 2025 setup media:
setup.exe /ACTION=EditionUpgrade /INSTANCENAME=MSSQLSERVER /PID=<YourEnterpriseProductKey> /IACCEPTSQLSERVERLICENSETERMS

After the upgrade completes and the instance restarts, reapply the desired affinity I/O mask / affinity64 I/O mask values using sp_configure as shown in Step 3.