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
modeland 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
modelwas intentionally targeted, proceed to Step 2, as this is a restricted operation.
Step 2: Modify the Backup Command
- Remove the
WITH NORECOVERYclause 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
modelto a specific point in time, note thatmodelcannot 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 formodelin most standard HA/DR strategies. - If
modelis in theFULLrecovery model and you require log backups for compliance reasons, switch it toSIMPLErecovery 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
modelappears to be in a “Restoring” state due to a failed attempt prior to hitting Error 4220, restart the SQL Server (MSSQLSERVER) service viaservices.mscon Windows Server 2025. - This forces the engine to re-initialize
modelfrom its last known good state, as SQL Server will refuse to start ifmodelis genuinely corrupted or stuck in recovery.
Alternative or Verification Steps
- Run
RESTORE DATABASE model WITH RECOVERYonly 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.