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

Troubleshooting Guide: SQL Server Error 3005 — “The Differential Partial Backup is Including a Read-Only Filegroup”

Why This Error Happens

This error occurs when you attempt a BACKUP DATABASE ... READ_WRITE_FILEGROUPS (differential partial backup) on a database containing a read-only filegroup that was never included in a prior full partial backup. SQL Server requires a baseline full partial backup of all read-write filegroups before it can calculate differential changes, and since read-only filegroups don’t change, they must be explicitly excluded or backed up separately beforehand. The root cause is almost always a missing base backup reference (LSN) for that filegroup in the backup history (msdb.dbo.backupset), not corruption or permissions.

Step-by-Step Resolution Guide

Step 1: Verify Filegroup Read-Only Status

  • Open SQL Server Management Studio (SSMS) and connect to your Windows Server 2025 instance.
  • Run the following query to identify which filegroups are marked read-only:
SELECT name, is_read_only FROM sys.filegroups;
  • Confirm which filegroup is triggering the conflict (usually an archival or historical data filegroup).

Step 2: Perform a Full Partial Backup First

  • Before running any differential partial backup, execute a one-time full partial backup that explicitly includes the read-only filegroup at least once.
  • Example syntax:
BACKUP DATABASE [YourDB] 
READ_WRITE_FILEGROUPS, [ReadOnly_FG_Name]
TO DISK = 'C:\Backups\YourDB_Full_Partial.bak'
WITH INIT;
  • This establishes the required LSN baseline in msdb.dbo.backupset.

Step 3: Correct the Differential Backup Syntax

  • Once the baseline exists, run the differential partial backup using only READ_WRITE_FILEGROUPS (do not manually name the read-only filegroup again).
  • Example:
BACKUP DATABASE [YourDB] 
READ_WRITE_FILEGROUPS
TO DISK = 'C:\Backups\YourDB_Diff_Partial.bak'
WITH DIFFERENTIAL;
  • Ensure the backup destination path has sufficient Windows Server 2025 disk I/O permissions for the SQL Server service account.

Step 4: Audit Backup Job Scripts (If Using SQL Agent)

  • Open SQL Server Agent > Jobs and review any automated maintenance plans.
  • Check for scripts that incorrectly hard-code the read-only filegroup name inside a DIFFERENTIAL backup command.
  • Remove the explicit filegroup reference from the differential step; rely solely on the READ_WRITE_FILEGROUPS keyword.

Alternative or Verification Steps

  • Verify the fix: Run RESTORE HEADERONLY FROM DISK = 'C:\Backups\YourDB_Full_Partial.bak' to confirm the backup type column shows a successful partial base backup before re-attempting the differential.
  • Alternative solution: If the filegroup data never changes, exclude it entirely from the backup strategy by using BACKUP DATABASE READ_WRITE_FILEGROUPS without ever referencing the read-only filegroup, and back it up manually only once annually or after an ALTER DATABASE ... MODIFY FILEGROUP READWRITE event.