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

Why This Error Happens

Error 5556 occurs when a FILESTREAM-related operation (such as GET_FILESTREAM_TRANSACTION_CONTEXT or a client call via the FILESTREAM API) references a database that either does not exist on the instance, is offline, or was never configured with FILESTREAM enabled at the database level. This typically happens because the FILESTREAM feature was enabled at the SQL Server instance level but not activated per-database, or the database name was misspelled/changed after migration. It can also surface after restoring a database to a new SQL Server 2025 instance where the instance-level FILESTREAM access level was reset to “Disabled” during setup.

Step-by-Step Resolution Guide

Step 1: Verify FILESTREAM Is Enabled at the Instance Level

  • Open SQL Server Configuration Manager on Windows Server 2025 / Windows 11.
  • Navigate to SQL Server Services → right-click your instance (e.g., MSSQLSERVER) → Properties → FILESTREAM tab.
  • Ensure “Enable FILESTREAM for Transact-SQL access” is checked, and optionally enable I/O streaming access if needed.
  • Restart the SQL Server service after applying changes.

Step 2: Confirm Instance-Level Configuration via T-SQL

  • Open SQL Server Management Studio (SSMS) and run:
  EXEC sp_configure filestream_access_level;
  • If the value is 0, enable it with:
  EXEC sp_configure filestream_access_level, 2;
  RECONFIGURE;
  • Restart the SQL Server (MSSQLSERVER) service from the Services console (services.msc) or Configuration Manager.

Step 3: Enable FILESTREAM at the Database Level

  • Confirm the target database exists:
  SELECT name FROM sys.databases;
  • If it exists but lacks FILESTREAM support, add a FILESTREAM filegroup:
  ALTER DATABASE YourDatabaseName
  ADD FILEGROUP FileStreamGroup CONTAINS FILESTREAM;

  ALTER DATABASE YourDatabaseName
  ADD FILE (NAME = FSData, FILENAME = 'C:\SQLData\FSData')
  TO FILEGROUP FileStreamGroup;
  • Ensure the path (e.g., C:\SQLData\FSData) exists and the SQL Server service account has write permissions.

Step 4: Validate the Database Name in the Application/Query

  • Double-check the exact spelling and case of the database name passed in your connection string or query.
  • Run the following to list all available databases supporting FILESTREAM:
  SELECT name, is_broker_enabled, containment_desc
  FROM sys.databases
  WHERE name = 'YourDatabaseName';

Alternative or Verification Steps

  • Run SELECT SERVERPROPERTY('FilestreamConfiguredLevel'); — a return value of 2 or 3 confirms Transact-SQL access is active at the instance level.
  • If the error persists after enabling FILESTREAM, try creating a brand-new test database with a FILESTREAM filegroup to confirm the feature works end-to-end, then compare its configuration against the problematic database using sys.filegroups.