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

Troubleshooting Guide: Error 2115 – Server Level Event Notifications Disabled (msdb Database Missing)

Why This Error Happens

This error occurs because SQL Server’s Service Broker relies on the msdb system database to manage server-level event notifications, and SQL Server has detected that msdb is either offline, corrupted, or missing entirely at startup. This typically happens due to improper shutdowns, disk corruption affecting the msdb.mdf/.ldf files, or manual deletion/relocation of the msdb database files without updating the registry startup parameters. In some cases, this also occurs after a failed upgrade or migration where msdb failed to attach correctly to the new SQL Server 2025 instance.

Step-by-Step Resolution Guide

Step 1: Verify the Current State of msdb

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following query to check database status:
  SELECT name, state_desc FROM sys.databases WHERE name = 'msdb';
  • If the query returns nothing or shows RECOVERY_PENDING/SUSPECT, msdb is confirmed missing or corrupted.
  • Check the SQL Server Error Log (default path: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for confirmation of file path errors.

Step 2: Locate and Restore msdb Database Files

  • Check the default data path for the missing files:
  C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\MSDBData.mdf
  C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf
  • If files are missing, restore them from a recent backup using:
  RESTORE DATABASE msdb FROM DISK = 'D:\Backups\msdb_backup.bak' WITH REPLACE;
  • If no backup exists, you must rebuild system databases (see Step 3).

Step 3: Rebuild System Databases (If No Backup Is Available)

  • Stop the SQL Server service via SQL Server Configuration Manager.
  • Run the setup executable from the installation media with the REBUILDDATABASE parameter:
  Setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=BUILTIN\Administrators
  • This resets msdb, master, and model to their default template state (note: this will not restore custom jobs, logins, or mail profiles stored in the old msdb).

Step 4: Update Registry Startup Parameters (If Files Were Relocated)

  • Open SQL Server Configuration Manager → right-click the SQL Server service → Properties → Startup Parameters.
  • Confirm the -d (master data file), -l (master log file), and -e (error log) paths are correct and point to valid, accessible drives.
  • If msdb was intentionally moved, update the physical file path via:
  ALTER DATABASE msdb MODIFY FILE (NAME = MSDBData, FILENAME = 'E:\NewPath\MSDBData.mdf');
  • Restart the SQL Server service to apply changes.

Step 5: Restart SQL Server and Confirm Service Broker Initialization

  • Restart the SQL Server (MSSQLSERVER) service via services.msc or Configuration Manager.
  • Monitor the Error Log for the line: Service Broker manager has started.
  • Confirm no further Error 2115 entries appear in the Windows Event Viewer under Applications and Services Logs > MSSQLSERVER.

Alternative or Verification Steps

  • Run SELECT DATABASEPROPERTYEX('msdb', 'Status'); — a result of ONLINE confirms the fix was successful.
  • If the rebuild in Step 3 was used, manually recreate SQL Agent jobs, Database Mail profiles, and maintenance plans, as these are stored in msdb and are not restored by the rebuild process.