How to Fix Microsoft SQL Server Login Failed Error 18456?
Microsoft SQL Server login failed error 18456 can be encountered due to varied reasons. When this error occurs, the server name entered is correct, but because of some unanticipated reasons, the permission to login cannot be granted. This error can be confronted in spite of the SQL Server edition or its type (Enterprise or Express) in use.
Most of the time, an error code comes up with a description that gives a hint about what has gone wrong. But unfortunately, in case of SQL Server error 18456 on screen, no cause of login failure is displayed. This is an intended development of the application in order to have protection against unauthorized users (probably, someone is trying to have entry to the server on the basis of guess information). However, the administrator can check out the event log in order to get details about occurrence of SQL Server error 18456.
Cause of Microsoft SQL Server login failed error 18456:
1: At the time of Server login, if either the username or password is incorrect, the error will be generated.
2: When an SQL Server instance is logged in for the very first time, possibility is that the users encounter SQL Server error 18456. This generally happens when the “Windows Authentication” is enabled under the security section and SQL Server is unable to recognize the user.
3: Possibility is that the password for login is expired. This can also happen while disabling the username on server.
Steps to Fix SQL Server Error 18456
Before we get started with the troubleshooting steps, make sure that the login credentials (username and password) entered is correct.
If Windows Vista or Windows 7 is used, then run SQL Server through Run as Admin option. This might give a solution.
If Windows authentication is enabled and the error is received, then use the SQL SA credentials. Moreover, check out if the Windows Active Directory has SQL login information associated. In order to add a user to the SQL Server DB, there are two things that must be available:
- Server Administrator Access
- System Admin (SA) Password
If SQL Server authentication mode is used to login to Server, then SQL System Admin credentials would be required. Before login check out that the password is not expired. For that, open SSMS, right click on server name and choose “Properties”.
You can also check out if password expiration is enabled. For that, select “General” tab and see if “Enforce Password Expiration” is enabled or disabled.
Select “Status” tab and find out if the account is locked. If the account is not locked, the “Login is locked out” will be disabled.
Check out Windows or Mixed authentication mode is enabled. For that, select the database, right click on it, and choose “Properties”. In the Security tab, check out the server authentication section.
If the authentication mode is changed, then do not forget to restart SQL Server to allow changes to take place.
Any of the above mentioned fixes can help to fix Microsoft SQL Server login failed error 18456. it is recommended to move in a systematic order and go for primary work around (credentials testing, modes to run application). However, if the above procedures failed to fix SQL Server error 18456 then one can also go through SQL password recovery tool to reset lost SA password of SQL Server in a short span of time.