The login exists, and SQL Server refuses it because the account is disabled. Unlike a wrong password, where the client gets a deliberately vague message and the real reason hides in the server error log, a disabled account says so. On a current driver the client sees the reason directly:
sqlcmd -S localhost -U ErrDemoDisabled -P "<password>" -C -Q "SELECT 1"

A wrong password on the same driver comes back as just Login failed for user, with no reason. The server error log has the same attempt, with the client address:
EXEC sys.xp_readerrorlog 0, 1, N'ErrDemoDisabled';

If the word disabled appears anywhere in the message, skip the password reset. The password may even be right, and none of that matters until the login is switched back on.
Why This Happens
Logins do not disable themselves. Someone or something did it:
- A leaver or security process. Disabling instead of dropping is the correct practice for accounts that might own objects or might need to come back, so tidy environments produce this error by design.
- The sa lockdown. Disabling
sais standard hardening, and anything still configured to connect assastarts failing with exactly this the moment it happens. - Policy lockout confusion. An account locked out by Windows password policy reports a different reason, but the two get mixed up in tickets constantly. The message text settles it: disabled means disabled.
- A restore or migration. Logins scripted from another server with
Generate-LoginScriptstyle tooling carry their disabled state with them, which is correct behaviour that surprises people.
Confirm the Login Is Disabled
SELECT name,
is_disabled,
type_desc,
modify_date
FROM sys.server_principals
WHERE name = N'ErrDemoDisabled';

is_disabled = 1 is the whole diagnosis, and modify_date tells you when it changed. Who changed it is a separate question, covered below.
The Fix
ALTER LOGIN [ErrDemoDisabled] ENABLE;
That is genuinely all, but before running it, ask the question the error is really raising: was this account disabled on purpose? If it belonged to a leaver, the fix is not enabling it, the fix is finding out what is still trying to use it, which the next section does.
Per Microsoft’s ALTER LOGIN reference, disabling does not end sessions that are already connected, and on the lab one kept running queries after the DISABLE. To stop a leaver now, find their session in sys.dm_exec_sessions and KILL it.
What Is Still Trying to Use It
The default trace records every failed login, and it names more than the error log does: the host, the application and its process ID. That is usually enough to find the job, service or connection string still using the account.
-- Failed logins for the account, from the default trace
DECLARE @path nvarchar(260) = (SELECT path FROM sys.traces WHERE is_default = 1);
SELECT t.StartTime,
t.LoginName,
t.HostName,
t.ApplicationName,
t.ClientProcessID
FROM sys.fn_trace_gettable(@path, DEFAULT) AS t
WHERE t.EventClass = 20 -- Audit Login Failed
AND t.LoginName = N'ErrDemoDisabled'
ORDER BY t.StartTime DESC;

The default trace rolls over, so on a busy server it may only reach back hours. Run it while the failures are still happening.
Who Disabled It
Not the default trace. On SQL Server 2025 it recorded the login being created and every failed attempt, but nothing for ALTER LOGIN ... DISABLE. A server audit with SERVER_PRINCIPAL_CHANGE_GROUP does record it, as action LGDA, with the login that ran it, but only if the audit was running before it happened:
-- Read an existing server audit for changes to the login
SELECT event_time,
action_id, -- LGDA = disabled, LGEA = enabled
server_principal_name AS changed_by,
statement
FROM sys.fn_get_audit_file(N'D:\Audit\*.sqlaudit', DEFAULT, DEFAULT) -- your audit's file path
WHERE statement LIKE N'%ErrDemoDisabled%'
ORDER BY event_time DESC;

With no audit, modify_date gives you the time, and the change record has to give you the rest.
When It Is Not This
If the message says nothing about the account being disabled you are in ordinary 18456 territory, where the client is told State 1 and the truth lives server-side. And if logins fail in a burst across many accounts, look at the domain and the server rather than any single login.
Frequently Asked Questions
Why does the client see the reason when a wrong password stays vague?
Should I enable it or recreate it?
How do I find out who disabled it?
Does disabling the login disconnect it?
EXECUTE AS. If the point is to stop someone now, find their sessions in sys.dm_exec_sessions and KILL them after the DISABLE.Where To Go Next
- Login Failed or Permission Denied, the router for when the reason line says something other than disabled
- Locked Out of SQL Server: Regain Sysadmin When Nobody Has It, the recovery when the disabled login is sa and no other sysadmin is left
- Login Failed (18456), the vague parent of this whole family
- Untrusted Domain (18452), the Windows-identity sibling
- Could Not Drop Login (15434), the next step when the disabled login is being retired for good
- Get Login Security Audit, every login’s state and policy flags in one pass
- Get Recent Error Log Entries, the last 24 hours of the log in one result, where the [CLIENT: ip] line for each attempt sits
- Kerberos vs NTLM, the authentication plumbing behind the series
Leave a Reply