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

Troubleshooting Guide: Error 1924 – Filegroup Is Read-Only

Why This Error Happens

This error occurs because SQL Server 2025 has marked the specified filegroup as read-only, either intentionally through a prior administrative action or automatically after detecting a critical write failure. Common root causes include the database being set to READ_ONLY at the filegroup level, disk space exhaustion on the underlying volume preventing write operations, or the filegroup residing on storage that was manually flagged read-only (such as after a failed autogrow operation or a storage snapshot restore). Additionally, this can surface when a database was restored from a read-only source (like an Azure Blob snapshot or secondary replica) without resetting the filegroup properties.

Step-by-Step Resolution Guide

Step 1: Verify the Current Filegroup and Database State

  • Open SQL Server Management Studio (SSMS) 21 or Azure Data Studio connected to your SQL Server 2025 instance.
  • Run the following query to check filegroup properties:
    SELECT name, is_read_only FROM sys.filegroups;
  • Also check the database-level setting: SELECT name, is_read_only FROM sys.databases WHERE name = 'YourDatabaseName';
  • Confirm whether the read-only flag is set at the database level or specifically on the filegroup.

Step 2: Check Underlying Disk Space and Storage Health

  • Navigate to the physical disk path (e.g., D:\SQLData\ or E:\SQLData\) via File Explorer or Get-PSDrive in PowerShell on Windows Server 2025.
  • Ensure there is sufficient free space; SQL Server will sometimes force a filegroup read-only state if autogrow fails due to a full disk.
  • If using Storage Spaces Direct or a SAN, verify the volume is online and not in a degraded/read-only state via Server Manager or Get-Volume.

Step 3: Set the Filegroup Back to Read-Write

  • If the filegroup was intentionally or accidentally set read-only, connect via SSMS and run:
    ALTER DATABASE [YourDatabaseName] MODIFY FILEGROUP [YourFileGroupName] READWRITE;
  • If the entire database is in read-only mode, instead run:
    ALTER DATABASE [YourDatabaseName] SET READ_WRITE WITH NO_WAIT;
  • Ensure no active transactions or blocking sessions are preventing the ALTER command from completing.

Step 4: Check for Corrupted or Orphaned Database Files

  • Run DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to rule out corruption that may have triggered an automatic read-only lockdown.
  • If corruption is found, review the SQL Server Error Log (located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG by default) for I/O error details (Error 823 or 824) that preceded Error 1924.

Step 5: Restart the SQL Server Service (If State Is Stuck)

  • Open Services (services.msc) on Windows Server 2025 or Windows 11.
  • Locate “SQL Server (MSSQLSERVER)” or your named instance, right-click, and select Restart.
  • This clears any stale internal flags that may be holding the filegroup in a read-only state despite successful ALTER commands.

Alternative or Verification Steps

  • Re-run SELECT name, is_read_only FROM sys.filegroups; after applying the fix to confirm the value now shows 0 (read-write).
  • If the issue persists after Step 3, restore the database from the last known good backup to a test instance to rule out metadata corruption in the primary file header.