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

Troubleshooting Guide: SQL Server Error 5112 — FCB::SetSize

Why This Error Happens

This message is logged whenever a database file (data or log) automatically grows or is manually resized by SQL Server, triggered by Auto-Growth settings or an explicit ALTER DATABASE MODIFY FILE command. It is purely informational in nature and is not indicative of corruption or failure, but it can flood the SQL Server Error Log if Auto-Growth events occur frequently due to undersized initial file allocations. The root cause is typically a database file that is too small for its workload, causing constant incremental growth events rather than failure of the storage subsystem itself.

Step-by-Step Resolution Guide

Step 1: Verify the Message is Benign

  • Open SQL Server Management Studio (SSMS) and navigate to Management > SQL Server Logs.
  • Confirm the full text matches: FCB::SetSize: file growth failed... or the standard informational variant mentioning oldSize and newSize.
  • Cross-reference the timestamp with any user complaints of slowness; if none exist, this is purely a logging frequency issue.

Step 2: Right-Size the Database Files to Reduce Growth Events

  • In SSMS, right-click the Database, select Properties > Files.
  • Manually increase the Initial Size (MB) of the data and log files to match projected 6–12 month growth to prevent constant auto-growth triggers.
  • Alternatively, run the following T-SQL to pre-allocate space immediately:
  ALTER DATABASE [YourDB] 
  MODIFY FILE (NAME = N'YourDB_log', SIZE = 8192MB);

Step 3: Adjust Auto-Growth Increments

  • Avoid percentage-based growth (e.g., 10%) on large files, as this causes massive, slow I/O spikes that generate this message.
  • Set Auto-Growth to a fixed MB value instead (e.g., 512MB or 1024MB) via Database Properties > Files > Autogrowth/Maxsize.
  • For Windows Server 2025 environments using Storage Spaces Direct (S2D), ensure the underlying volume isn’t nearing capacity, as this can slow down the SetSize operation significantly.

Step 4: Suppress the Message (If Growth is Expected and Optimized)

  • If the file sizes are already optimized and the message is simply noisy logging, trace flag 1807 can be used to suppress this specific informational message.
  • Add the startup parameter via SQL Server Configuration Manager: -T1807.
  • Restart the SQL Server (MSSQLSERVER) service for the trace flag to take effect.

Alternative or Verification Steps

  • Verify: Monitor the SQL Server Error Log for 24–48 hours; the frequency of Error 5112 entries should drop significantly if file sizing was the root cause.
  • Alternative: If running on Windows Server 2025 with Instant File Initialization (IFI) disabled, enable the “Perform Volume Maintenance Tasks” security policy for the SQL Service account via secpol.msc to drastically speed up data file growth operations (Note: this does not apply to Log files).