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

Troubleshooting Guide: Error 4220 – Cannot Back Up the Log of the Model Database with NORECOVERY

Why This Error Happens

This error occurs because the model database is a system database that does not support transaction log backups using the WITH NORECOVERY option, as this option leaves the database in a restoring, inaccessible state. Since SQL Server depends on model being online and accessible at all times to create new user databases and for internal engine operations, Microsoft explicitly blocks any operation that could take it offline or leave it in a non-recovered state. This is a safeguard built into the SQL Server 2025 engine rather than a configuration or permissions error.

Step-by-Step Resolution Guide

Step 1: Verify the Target Database

  • Confirm that the backup command is actually targeting model and not a similarly named user database.
  • Run the following query to inspect current database states:
SELECT name, state_desc, recovery_model_desc FROM sys.databases;
  • If model was intentionally targeted, proceed to Step 2, as this is a restricted operation.

Step 2: Modify the Backup Command

  • Remove the WITH NORECOVERY clause from your T-SQL script or SQL Server Agent job step.
  • Use a standard log backup syntax instead:
BACKUP LOG model TO DISK = 'C:\Backups\model_log.bak';
  • If the goal was to restore model to a specific point in time, note that model cannot be restored over while the SQL Server instance is running, as the engine requires it to function.

Step 3: Re-evaluate the Backup Strategy for System Databases

  • Open SQL Server Management Studio (SSMS) and navigate to Management > Maintenance Plans.
  • Ensure that any maintenance plan backing up system databases (master, model, msdb) uses Full Backup types only, as log backups with recovery-altering options are unnecessary for model in most standard HA/DR strategies.
  • If model is in the FULL recovery model and you require log backups for compliance reasons, switch it to SIMPLE recovery to avoid unnecessary log growth and backup complexity:
ALTER DATABASE model SET RECOVERY SIMPLE;

Step 4: Restart the SQL Server Service (If State is Stuck)

  • If model appears to be in a “Restoring” state due to a failed attempt prior to hitting Error 4220, restart the SQL Server (MSSQLSERVER) service via services.msc on Windows Server 2025.
  • This forces the engine to re-initialize model from its last known good state, as SQL Server will refuse to start if model is genuinely corrupted or stuck in recovery.

Alternative or Verification Steps

  • Run RESTORE DATABASE model WITH RECOVERY only if the database is stuck in a restoring state from a previous erroneous attempt; this will bring it back online immediately.
  • Verify the fix by running a standard full backup against model (BACKUP DATABASE model TO DISK = 'C:\Backups\model_full.bak') to confirm the instance recognizes the database as healthy and accessible.