18456
MediumDatabase Engine

Login Failed — the user login attempt failed

What 18456 Means

The 18456 error on the SQL Server engine-errors indicates login failed — the user login attempt failed. This typically occurs due to incorrect username or password provided.

Error 18456 is a generic security error. SQL Server purposely provides limited information in the error message to prevent attackers from discovering which part of the credentials was incorrect.

Technical Background

The login process in SQL Server involves two main steps: authentication (verifying who you are) and authorization (checking what you are allowed to do). Error 18456 happens during the authentication step, meaning the server couldn't verify the identity provided.

For security reasons, the public error message is always vague. Administrators can find the specific reason (like 'password expired' or 'invalid password') by checking the SQL Server Error Log on the server machine.

Common Causes

  • Incorrect username or password provided
  • Login disabled by an administrator
  • Account locked out due to too many failed attempts

Typical Scenarios

  • An application service account has an expired password
  • A developer uses the wrong connection string credentials

What to Know

Verifying credentials and account status is the standard response to authentication failures. For administrators, the SQL Server Error Log contains specific 'State' codes that reveal the exact cause of the login rejection.

Frequently Asked Questions

Common questions about SQL Server 18456 error

This is a security feature to prevent brute-force attacks from identifying valid usernames.