Troubleshooting Guide: SQL Server Error 9794 – Broker Mirroring Manager Not Fully Initialized
Why This Error Happens
This error occurs when the Service Broker’s mirroring manager component attempts to process mirroring-related operations before SQL Server has completed its startup initialization sequence. This is commonly triggered by a race condition during database recovery, where dependent system databases (particularly msdb or master) have not finished coming online. It can also occur if the SQL Server service account lacks sufficient permissions to access Service Broker endpoint certificates, or if the broker configuration became corrupted during an unexpected shutdown.
Step-by-Step Resolution Guide
Step 1: Verify SQL Server Startup Completion
- Check the SQL Server Error Log located at
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOGto confirm whether the server has fully completed recovery. - Look for the message “SQL Server is now ready for client connections” — if this is missing or delayed, the mirroring manager likely initialized prematurely.
- Restart the SQL Server service cleanly using:
net stop MSSQLSERVERfollowed bynet start MSSQLSERVER.
Step 2: Validate Service Broker Configuration
- Open SQL Server Management Studio (SSMS) and run the following query to confirm Broker is enabled:
SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';- If
is_broker_enabledreturns0, re-enable it using:ALTER DATABASE YourDatabaseName SET ENABLE_BROKER; - Ensure no orphaned Broker conversations are blocking initialization by running:
SELECT * FROM sys.conversation_endpoints;
Step 3: Check Service Account Permissions
- Open Services.msc on Windows Server 2025 and confirm the SQL Server service is running under the correct domain or managed service account.
- Verify the account has Log on as a service rights under
Local Security Policy > User Rights Assignment. - Confirm the account has read/write access to the Service Broker master key and certificate store via
Certificates - Local Computerin the MMC snap-in.
Step 4: Rebuild the Broker GUID (If Corruption Is Suspected)
- If the database was restored or copied, the Broker ID may conflict with another instance.
- Run the following command to assign a new Broker GUID:
ALTER DATABASE YourDatabaseName SET NEW_BROKER; - Note: This action clears existing conversations, so only use this if no critical Broker messages are pending in the queue.
Step 5: Apply Latest Cumulative Update
- Navigate to the Microsoft Update Catalog and confirm you are running the latest Cumulative Update (CU) for SQL Server 2025.
- Install any pending CU via the downloaded
.exepackage, as this specific initialization race condition is frequently patched in maintenance releases.
Alternative or Verification Steps
- To verify the fix, re-run
SELECT * FROM sys.dm_broker_connections;— if the query returns active connections without error 9794 appearing in the log, initialization is successful. - If the issue persists after patching and configuration checks, perform a full restart of the Windows Server 2025 host (not just the SQL service) to clear any stuck OS-level handles tied to the Broker endpoint.