Troubleshooting Guide: Error 9771 – Service Broker Manager Disabled in Single-User Mode
Why This Error Happens
Error 9771 occurs because SQL Server 2025, when started in single-user mode (-m startup flag), automatically disables the Service Broker manager to prevent background task threads from consuming the single available administrative connection. This is by design—Service Broker requires asynchronous message processing that conflicts with the restricted connection model of single-user mode. The error typically surfaces when administrators attempt to run Service Broker-dependent commands (like ALTER DATABASE SET ENABLE_BROKER or querying sys.transmission_queue) while the instance is still constrained to single-user access.
Step-by-Step Resolution Guide
Step 1: Verify Current Startup Mode
- Open SQL Server Configuration Manager on Windows Server 2025 / Windows 11.
- Navigate to SQL Server Services > right-click your instance > Properties > Startup Parameters tab.
- Check if
-mor-mSQLCMDis listed as an active startup parameter. - Alternatively, run this query to confirm:
SELECT SERVERPROPERTY('IsSingleUser');(returns1if true).
Step 2: Remove Single-User Mode Startup Flag
- In SQL Server Configuration Manager, select the
-mparameter under Startup Parameters and click Remove. - Click OK, then restart the SQL Server service:
net stop MSSQLSERVER
net start MSSQLSERVER
- If you started single-user mode via command line instead, stop the instance with
Ctrl+Cornet stopand restart normally without the-mswitch.
Step 3: Restart SQL Server in Multi-User Mode
- Confirm the service restarted successfully by checking the SQL Server Error Log at:
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOG - Look for the line:
SQL Server is now ready for client connections(without single-user mode references). - Once confirmed, Service Broker will automatically re-enable since the restriction tied to single-user mode no longer applies.
Step 4: Re-Enable Service Broker on Affected Databases
- If Service Broker was disabled at the database level prior to entering single-user mode, re-enable it manually:
ALTER DATABASE [YourDatabaseName] SET ENABLE_BROKER;
- Ensure no other active connections are blocking this ALTER statement; use
WITH ROLLBACK IMMEDIATEif needed.
Alternative or Verification Steps
- Run
SELECT is_broker_enabled FROM sys.databases WHERE name = 'YourDatabaseName';— a return value of1confirms Service Broker is active again. - If the instance must remain in single-user mode for maintenance (e.g., running
DBCC CHECKDBrepairs), defer Service Broker-dependent operations until multi-user mode is restored, as this is expected behavior rather than a bug.