How to Resolve SQL Server Single User Mode Login Failure (Error 18461) for Admin Connections


34 views

When SQL Server is started in single user mode (-m flag), it's designed to allow exactly one administrative connection to perform critical maintenance. The error 18461 occurs when the server believes another connection has already claimed this slot - even when you're certain no other connections exist.

Many administrators make these mistakes when trying to connect:

-- Attempting connection via SSMS GUI (often fails)
sqlcmd -S .\SQLEXPRESS -E -m"SQLCMD"  -- Case sensitivity matters!

The most reliable method is using sqlcmd with dedicated naming:

-- Recommended approach
sqlcmd -S .\SQLEXPRESS -E -m"MYADMINCONNECTION"

Before attempting connection, check for existing processes:

-- Run from command prompt (not SQL connection)
tasklist /FI "IMAGENAME eq sqlservr.exe"
netstat -ano | find "1433"  -- Replace with your actual port

When the basic -m flag fails, try these combinations:

-- For named instances
sqlservr -m"SQLCMD" -sSQLEXPRESS -f

-- For default instances with trace flags
sqlservr -m -T3608 -T4022

If running under a service account, you might need to specify the client application name differently:

-- For service account scenarios
sqlcmd -S .\SQLEXPRESS -U sa -P yourpassword -m"SERVICE_RECOVERY"

Completely reset the single user mode access:

-- Stop SQL Server completely
net stop MSSQL$SQLEXPRESS

-- Start with minimal configuration
sqlservr -c -m"EMERGENCY" -f -T3608

Remember to check SQL Server error logs for details about connection attempts and authentication failures. The logs often reveal why your connection is being rejected.


When dealing with SQL Server 2008 R2 Express in single user mode (-m flag), many administrators encounter the frustrating Error 18461: "Login failed... Server is in single user mode. Only one administrator can connect at this time." Let's break down the real issues and solutions.

The -m startup parameter doesn't actually "reserve" a connection slot - it merely specifies which application type gets priority. The server still enforces single connection rules strictly. Common misconceptions:

-- These WON'T guarantee your connection:
sqlservr.exe -m"SQLCMD"
sqlservr.exe -m"Microsoft SQL Server Management Studio"

Here's the bulletproof approach:

  1. Stop ALL SQL Server services completely
  2. Run from command prompt (admin):
net start MSSQL$SQLEXPRESS /f /mSQLCMD
sqlcmd -S .\SQLEXPRESS -E

Or for named instances:

sqlcmd -S YourServer\InstanceName -E

For Management Studio access, use this precise sequence:

net stop MSSQL$SQLEXPRESS
net start MSSQL$SQLEXPRESS /m"Microsoft SQL Server Management Studio"

Then immediately open SSMS and connect using Dedicated Administrator Connection (add ADMIN: before server name).

Server name: ADMIN:YourServer\InstanceName

If you're still locked out:

  1. Check for orphaned processes:
SELECT * FROM sys.dm_exec_connections
  1. Verify no other services auto-start:
sc query MSSQL$SQLEXPRESS
  1. Consider trace flag 3608 for minimal startup:
sqlservr.exe -c -m -T3608
  • Always script your single-user operations beforehand
  • Use timeout parameters: sqlcmd -t 30
  • Consider PowerShell alternatives for more control
Start-Service -Name MSSQL$SQLEXPRESS -ArgumentList '-mSQLCMD'
Invoke-Sqlcmd -ServerInstance .\SQLEXPRESS -Query "SELECT @@VERSION"