## TL;DR

To check a disabled login, run SELECT name, is_disabled FROM sys.sql_logins in master; enable it with ALTER LOGIN [name] ENABLE. 'Login failed for user' (Error 18456) means the username or password is wrong, or the login is disabled: ask the service administrator for valid credentials.

## The error

```text
login failed means bad credentials or disabled login
```

## Fix

1. To check a disabled login, run SELECT name, is_disabled FROM sys.sql_logins in master; enable it with ALTER LOGIN [name] ENABLE.
   Expected: You see the expected output instead of the problem.
2. Re-run the original operation and confirm the error is gone.
   Expected: no error, normal output.

## When to use

- You hit this exact error with Azure SQL error 18456.
- The symptom matches: login failed means bad credentials or disabled login.

## When NOT to use

- A different error message from Azure SQL error 18456; the cause here is specific to this error.
- Unrelated Azure SQL error 18456 issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against Azure SQL error 18456. Source: https://github.com/microsoftdocs/sql-docs/blob/HEAD/azure-sql/database/troubleshoot-common-errors-issues.md.

## Variant phrasings

### login failed means bad credentials or disabled login

## Why it happens

18456 is never a network error. Check the login itself.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.

## Source

https://github.com/microsoftdocs/sql-docs/blob/HEAD/azure-sql/database/troubleshoot-common-errors-issues.md