SQL Server error 18470: Login failed, account disabled
The SQL Server login exists but has been disabled, so SQL Server refuses it even with the right password.
- Error number
18470- Severity
- 14
- Category
- Connection and login
What it means
A login can be disabled with ALTER LOGIN ... DISABLE, which keeps the login and its permissions but blocks every connection. The sa login is disabled by default when SQL Server is installed in Windows authentication mode.
Common causes
- An administrator disabled the login on purpose, for example while decommissioning an application.
- The
salogin is still disabled from installation. - A script or policy disabled logins after a security review.
How to fix it
-
Check the login's state.
SELECT name, is_disabled FROM sys.server_principals WHERE name = N'app_user';
-
Enable it again if it should be allowed to connect.
ALTER LOGIN app_user ENABLE;
Related errors
18456Login failed for user18486Login failed, account locked out18487Login failed, password expired
More connection and login errors
53Network-related or instance-specific4060Cannot open database requested4064Cannot open user default database18452Login is from an untrusted domain18488Login failed, password must be changed18461Login failed, single user mode
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.