// SQL Server error reference

SQL Server error 18461: Login failed, single user mode

SQL Server was started in single-user mode (-m), and another connection, often a service or tool, already took the one administrator slot.

Error number
18461
Severity
14
Category
Connection and login
Error message
Login failed for user '%.*ls'. Reason: Server is in single user mode. Only one administrator can connect at this time.%.*ls

What it means

Starting SQL Server with the -m startup option (used for recovery tasks such as restoring master or regaining sysadmin access) allows only one administrator connection. Whoever connects first gets it. Every other attempt fails with 18461, and services like SQL Server Agent or reporting tools often grab the slot before you do.

Common causes

  • SQL Server Agent, an application, or SSMS's Object Explorer connected first and holds the single connection.
  • The instance was left in single-user mode after maintenance.

How to fix it

  1. Stop SQL Server Agent and other services or applications that connect automatically, then connect again.

  2. Restrict the single connection to one program name with -m"sqlcmd" (or -m"Microsoft SQL Server Management Studio - Query" for an SSMS query window), so other clients can't take it.

  3. When the maintenance is done, remove -m from the startup parameters and restart the service.

Related errors

More connection and login errors

The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.

// fewer errors, faster fixes

Work on SQL Server in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.