18456 Error State List
ERROR STATE ERROR DESCRIPTION
- State 2 and State 5 Invalid userid
- State 6 Attempt to use a Windows login name with SQL Authentication
- State 7 Login disabled and password mismatch
- State 8 Password mismatch
- State 9 Invalid password
- State 11 and State 12 Valid login but server access failure
- State 13 SQL Server service paused
- State 18 Change password required
Potential causes
Below is a list of reasons and some brief explanation what to do:
**SQL Authentication not enabled**: If you use SQL Login for the first time on SQL Server instance than very often error 18456 occurs because server might be set in Windows Authentication mode (only).
*How to fix*? Check this [SQL Server and Windows Authentication Mode page.][1]
**Invalid userID:** SQL Server is not able to find the specified UserID on the server you are trying to get. The most common cause is that this userID hasn’t been granted access on the server but this could be also a simple typo or you accidentally are trying to connect to different server (Typical if you use more than one server)
**Invalid password:** Wrong password or just a typo. Remember that this username can have different passwords on different servers.
**less common errors:** The userID might be disabled on the server. Windows login was provided for SQL Authentication (change to Windows Authentication. If you use SSMS you might have to run as different user to use this option). Password might have expired and probably several other reasons…. If you know of any other ones let me know.
**18456 state 1 explanations:** Usually Microsoft SQL Server will give you error state 1 which actually does not mean anything apart from that you have 18456 error. State 1 is used to hide actual state in order to protect the system, which to me makes sense. Below is a list with all different states and for more information about retrieving accurate states visit [Understanding "login failed" (Error 18456) error messages in SQL Server 2005][2]
Hope that helps
[1]:
[To see links please register here]
[2]:
[To see links please register here]