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
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
-
Stop SQL Server Agent and other services or applications that connect automatically, then connect again.
-
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. -
When the maintenance is done, remove
-mfrom the startup parameters and restart the service.
Related errors
More connection and login errors
53Network-related or instance-specific4060Cannot open database requested4064Cannot open user default database18452Login is from an untrusted domain18470Login failed, account disabled18486Login failed, account locked out18487Login failed, password expired18488Login failed, password must be changed
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.
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.