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

Troubleshooting Guide: SQL Server Error 5581 — FILESTREAM Feature Disabled

Why This Error Happens

Error 5581 occurs when FILESTREAM is enabled at the SQL Server instance level (via sp_configure) but has not been correctly enabled at the Windows operating system level through SQL Server Configuration Manager, or vice versa. This mismatch typically happens because the FILESTREAM settings require changes in two separate places — the OS-level service property and the SQL Server instance configuration — and a pending change in either location requires a full service restart before it takes effect. Additionally, this error can surface if the SQL Server service account lacks the necessary permissions to access the FILESTREAM share, or if a previous configuration change was only partially applied.

Step-by-Step Resolution Guide

Step 1: Enable FILESTREAM at the Windows OS Level

  • Open SQL Server Configuration Manager (search for SQLServerManager17.msc or similar version-specific name on Windows Server 2025 / Windows 11).
  • Navigate to SQL Server Services, right-click your instance (e.g., SQL Server (MSSQLSERVER)), and select Properties.
  • Go to the FILESTREAM tab and check Enable FILESTREAM for Transact-SQL access.
  • If you need network/client access, also check Enable FILESTREAM for file I/O streaming access and specify a valid Windows share name (e.g., MSSQLSERVER).
  • Click Apply, then OK.

Step 2: Enable FILESTREAM at the SQL Server Instance Level

  • Open SQL Server Management Studio (SSMS) and connect using an account with sysadmin privileges.
  • Run the following T-SQL to enable FILESTREAM access at the engine level:
EXEC sp_configure 'filestream access level', 2;
RECONFIGURE;
  • A value of 0 disables FILESTREAM, 1 enables Transact-SQL access only, and 2 enables full access including I/O streaming.

Step 3: Restart the SQL Server Service

  • In SQL Server Configuration Manager, right-click the instance name and select Restart.
  • Alternatively, use PowerShell as Administrator:
Restart-Service -Name 'MSSQLSERVER' -Force
  • If using a named instance, replace MSSQLSERVER with MSSQL$<InstanceName>.

Step 4: Validate Service Account Permissions

  • Confirm the SQL Server service account has Full Control permissions on the folder path hosting the FILESTREAM data container.
  • Check Windows Firewall rules to ensure port 445 (SMB) is open if FILESTREAM I/O streaming is accessed remotely.
  • Re-run sp_configure to confirm the committed value matches the running value (see verification step below).

Alternative or Verification Steps

  • Run EXEC sp_configure 'filestream access level'; and confirm the run_value column matches the config_value column (both should show 2 if full access is desired) — a mismatch means the restart hasn’t fully applied the change.
  • If the error persists after a restart, check the SQL Server Error Log (via EXEC xp_readerrorlog 0, 1, N'FILESTREAM';) for additional details, and verify no Group Policy or third-party security software is blocking the FILESTREAM share creation.