Why This Error Happens
Error 5554 occurs when SQL Server data or log files reside on a ReFS (Resilient File System) volume that uses block-cloning technology for features like Instant File Initialization, database snapshots, or backup/restore operations relying on Volume Shadow Copy (VSS). Each copy-on-write operation increments an internal file version counter, and ReFS enforces a hard ceiling (typically 8,192 versions per file) on how many of these references a single file can hold. When frequent snapshots, rapid growth/shrink cycles, or third-party backup tools repeatedly clone the same database file without ever “flattening” the version chain, the counter eventually maxes out and the file system refuses further write operations, which SQL Server surfaces as Error 5554.
Step-by-Step Resolution Guide
Step 1: Identify the Affected File and Active Snapshots
- Run
SELECT name, physical_name FROM sys.master_files;to locate the exact.mdf/.ldffile referenced in the error log. - Check for lingering database snapshots with
SELECT name, source_database_id FROM sys.databases WHERE source_database_id IS NOT NULL; - Drop any unneeded snapshots:
DROP DATABASE [YourDB_Snapshot];
Step 2: Reset the File’s Version Chain via Backup and Restore
- Take a full native backup of the affected database:
BACKUP DATABASE [YourDB] TO DISK = 'E:\Backups\YourDB_Full.bak'; - Take the database offline or detach it:
ALTER DATABASE [YourDB] SET OFFLINE; - Restore the backup to a newly created file on the same or a different volume, which forces ReFS to allocate a fresh file object with a reset version counter:
RESTORE DATABASE [YourDB] FROM DISK = 'E:\Backups\YourDB_Full.bak' WITH MOVE 'YourDB_Data' TO 'E:\SQLData\YourDB_New.mdf', MOVE 'YourDB_Log' TO 'E:\SQLLogs\YourDB_New.ldf', REPLACE;
Step 3: Disable or Reconfigure ReFS Block Cloning
- Open PowerShell as Administrator and check the volume’s file system:
Get-Volume -DriveLetter E - If ReFS block-cloning is not required for your workload, migrate the volume to NTFS, or disable the Data Deduplication feature that triggers cloning:
Disable-DedupVolume -Volume "E:" - For volumes that must remain ReFS, reduce snapshot frequency in your backup/VSS scheduler to limit version accumulation.
Step 4: Review Third-Party Backup/Snapshot Tools
- Check scheduled tasks and backup software (e.g., VEEAM, Windows Server Backup) for overly aggressive snapshot intervals.
- Adjust retention policies so that older versions are purged (
vssadmin delete shadows /for=E: /oldest) before new ones accumulate.
Step 5: Apply Latest Windows Server 2025 Cumulative Update
- Confirm you are running the latest Windows Server 2025 patch level via
winveror Windows Update, since known ReFS version-counter handling fixes are periodically shipped as cumulative updates. - Restart the server after patching and re-run the affected SQL Server workload to confirm the fix.
Alternative or Verification Steps
- Verify the fix by running the previously failing operation (e.g., a snapshot creation, bulk insert, or backup) and confirming no Error 5554 appears in the SQL Server error log (
EXEC sp_readerrorlog;). - If the error persists, as a fallback, migrate the database files entirely to an NTFS-formatted volume, which does not impose the same per-file version ceiling as ReFS.