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

Troubleshooting Guide: Error 5589 — FILESTREAM Access Under RCSI

Why This Error Happens

Error 5589 occurs because SQL Server 2025 does not support accessing FILESTREAM data through row-versioning-based isolation levels, specifically Read Committed Snapshot Isolation (RCSI) or Snapshot Isolation. This limitation exists because FILESTREAM data is stored as BLOBs on the NTFS/ReFS filesystem rather than in the database’s internal pages, so the Database Engine cannot apply row-versioning semantics to retrieve a transactionally consistent historical version of that file data. When a session attempts to read a FILESTREAM column while the database has RCSI enabled and the transaction is operating under snapshot semantics, the engine throws this error instead of returning inconsistent data.

Step-by-Step Resolution Guide

Step 1: Confirm the Database Isolation Level Configuration

  • Open SQL Server Management Studio (SSMS) or Azure Data Studio connected to your Windows Server 2025 / Windows 11 instance.
  • Run the following query to check current settings:
SELECT name, is_read_committed_snapshot_on, snapshot_isolation_state_desc
FROM sys.databases
WHERE name = 'YourDatabaseName';
  • Confirm whether is_read_committed_snapshot_on is set to 1, which is the likely trigger for the FILESTREAM conflict.

Step 2: Force the Transaction to Use READ COMMITTED Locking for FILESTREAM Access

  • Rather than disabling RCSI database-wide (which can affect concurrency for other tables), isolate the FILESTREAM-related transaction using a table hint or isolation level override.
  • Modify the query that accesses FILESTREAM data to explicitly request locking-based isolation:
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN TRAN
    SELECT FileData.PathName()
    FROM dbo.YourFileTable WITH (READCOMMITTEDLOCK)
    WHERE DocumentID = 101;
COMMIT TRAN
  • This forces the specific read to bypass the row-versioning engine and read the latest committed version directly.

Step 3: Disable RCSI at the Database Level (If Table Hints Are Not Feasible)

  • If your application cannot be modified to include hints, you may need to turn off RCSI entirely for the database.
  • Ensure no active connections are present, then run:
ALTER DATABASE YourDatabaseName
SET READ_COMMITTED_SNAPSHOT OFF
WITH ROLLBACK IMMEDIATE;
  • Note: This requires exclusive access to the database momentarily and will revert all sessions to default locking-based read committed behavior.

Step 4: Restart the SQL Server FILESTREAM Service Dependency

  • On Windows Server 2025 / Windows 11, open Services.msc and verify that the SQL Server VSS Writer and the FILESTREAM share (via SQL Server Configuration Manager) are running correctly.
  • Navigate to SQL Server Configuration Manager > SQL Server Services > [Your Instance] > Properties > FILESTREAM tab to confirm the share name matches your connection string.
  • Restart the SQL Server service to apply any configuration changes cleanly.

Alternative or Verification Steps

  • Verify the fix by re-running the original query or application process that previously threw Error 5589; it should now return the FILESTREAM data without exception.
  • As an alternative, if row-versioning is critical for your workload, consider migrating FILESTREAM BLOBs to a standard VARBINARY(MAX) column or implementing FileTable with explicit locking reads only for the specific transactions requiring snapshot consistency.