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

Troubleshooting Guide: Error 3109 — Master Database Restore Failure in SQL Server 2025

Why This Error Happens

Error 3109 occurs because the master database is a special system database that SQL Server cannot restore incrementally. Unlike user databases, master does not support NORECOVERY, differential restores, or transaction log restores because the SQL Server instance itself depends on master being fully recovered and online before any other recovery phase can execute. This error typically surfaces when an administrator attempts to script a master restore using the same multi-step process (full + differential/log) used for user databases, or when a backup automation tool incorrectly applies WITH NORECOVERY to a master backup job.

Step-by-Step Resolution Guide

Step 1: Stop the SQL Server Service and Start in Single-User Mode

  • Open Services (services.msc) on Windows Server 2025 / Windows 11 and stop the SQL Server (MSSQLSERVER) service (or named instance).
  • Open an elevated Command Prompt and start the engine manually in single-user, minimal configuration mode:
  cd "C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn"
  sqlservr.exe -m -T3608
  • Leave this window open; it keeps the instance running in single-user mode for the restore.

Step 2: Restore Master Using a Full Backup Only (No Recovery Options)

  • Open a second Command Prompt (do not close the first) and connect via sqlcmd:
  sqlcmd -S localhost -E
  • Run the restore command without NORECOVERY, STANDBY, or any staged option — master only accepts a single-step full restore:
  RESTORE DATABASE master 
  FROM DISK = 'C:\SQLBackups\master_full.bak' 
  WITH REPLACE;
  GO
  • Confirm the backup file path exists and is not corrupted (RESTORE VERIFYONLY FROM DISK = 'C:\SQLBackups\master_full.bak').

Step 3: Allow SQL Server to Shut Down and Restart Normally

  • After the restore completes, SQL Server automatically shuts down the instance since master was replaced.
  • Close the sqlservr.exe -m -T3608 console window if it hasn’t exited on its own.
  • Restart the SQL Server service normally via services.msc or:
  net start MSSQLSERVER

Step 4: Validate Instance Health Post-Restore

  • Connect via SQL Server Management Studio (SSMS) or sqlcmd and run DBCC CHECKDB('master') to confirm consistency.
  • Review the SQL Server Error Log (ERRORLOG in the MSSQL\Log folder) for any startup warnings related to orphaned logins or missing system objects.

Alternative or Verification Steps

  • Verify the fix: Run SELECT SERVERPROPERTY('ProductVersion'), SERVERPROPERTY('Edition'); in SSMS to confirm the instance is online and responsive after the restore.
  • Alternative approach: If the full backup is unavailable or corrupted, rebuild system databases using setup.exe /ACTION=REBUILDDATABASE from the SQL Server 2025 installation media, then reapply logins, jobs, and configurations from a master script backup instead of a .bak file.