How to Fix SQL Server Error 18456 [Login Failed for Users]?
Sometimes Microsoft SQL Server users may face the login failed error 18456 due to several reasons. Thereafter they want to fix SQL Server error 18456 forever. This error becomes most irritating for system administrators because they cannot connect to SQL server database.
Microsoft SQL Server login failed error 18456 may be encountered because of various reasons that we will discuss later. Recently, one of our respective clients was unable to connect with SQL Server. Hence, he contacted to our support team for resolving this issue.
User Query About SQL Login Failed Error 18456
When I am trying to connect with MS SQL Server, I am getting an error message like “Microsoft SQL Server error 18456: Login failed for User”. I am using SQL Server 2016 version but I never received this type of error before. I need to update some crucial information in SQL database and I am unable to login. Please suggest me tips and tricks to fix error 18456 SQL Server.
What Is SQL Server Error 18456?
Users receive SQL Server login failed error 18456 if the SQL Server login attempt is rejected due to authentication failure. Even there are also some other reasons for login failure for user Microsoft SQL Server 18456 as mentioned below.
- Invalid credentials
- Expire password
- Enable wrong authentications
Most of the time error codes show complete descriptions of errors. Hence, administrators get the hint to fix error 18456 in SQL Server but state 1 doesn’t provide much information about the error. Know the SQL error 18456 different state(s).
State | Description |
1 | Many error details are not available. |
2 & 5 | Invalid user ID. |
6 | Someone tried to login with a Windows Login name with SQL authentication. |
7 | Login is disabled due to login with incorrect password attempts. |
8 | SQL Server password is not incorrect. |
9 | The password is not valid. |
11 & 12 | SQL Server access failed while login is valid. |
18 | This is mandatory to change the password before login. |
38 & 46 | Couldn’t find user requested database. |
58 | If the administrator set SQL Server to use with Windows authentication only. But the user tried to login with different authentication. |
102 – 111 | AAD failure. |
122 – 124 | The Login attempt failed because of an empty password and user name. |
126 | The requested database doesn’t exist. |
132 & 133 | AAD failure. |
How to Fix Error 18456 in SQL Server?
Here are some solutions available to fix login failed for user Microsoft SQL Server 18456.
Phase 1: Connect with Remote Desktop
The troubleshooting and methods require you to login to the SQL Server to fix SQL Server error 18456. This is mandatory to have an active Windows Authentication connection to SQL Server using Microsoft SQL Server Management Studio. Thus, this is advisable for users to connect directly to SQL Server using a remote desktop connection. Follow the mentioned steps to run Remote Desktop Connection.
- Firstly, press the Start button.
- Open Run App in Windows.
- Enter mstsc command in Run App and press Enter.
- Fill Server IP address in a specific field.
- Lastly, click on the Connect button.
After that, a Windows login screen will appear if all things are right and according to the plan.
Phase 2: Use Microsoft SQL Server Management Studio (SSMS)
After successful login to the server, start SQL Server Management Studio. This is the default and expert-recommended tool for SQL Server management. Thereafter, it will ask to the server login. Most of the users enabled the Windows Authentication login method. But they can also try to connect it using different authentication types as mentioned below.
- Windows Authentication
- SQL Server Authentication
- Active Directory – Universal with MFA support
- Active Directory – Password & Integrated
Note: This is advisable to use SQL Server Authentication because it may or may not be enabled. If SQL Server authentication will be enabled then you can easily login to the server. However, these settings depend on Microsoft SQL Server versions, installation, and configuration.
Phase 3: Enable Required SQL Authentication
Once you login to the SQL server using Windows Authentication, you can also enable SQL server authentication mode. Users can easily enable SQL authentication to fix error 18456 SQL Server in simple steps.
- Right-click on the Server Name in the Object Explorer Window of SSMS.
- Thereafter, choose the Properties option.
- Then, select a page as Security.
- Now check the Server Authentication type.
- If “Windows Authentication mode” is enabled, then you need to enable “SQL Server and Windows Authentication mode”.
- After that, restart your SQL Server to reflect the changes.
Phase 4: Check SQL Server User Permissions
Now you need to monitor and verify SQL Server user permissions to ensure the following questions.
- Are SQL permissions fine for user and administrator logins?
- Have we created strong passwords to avoid unauthorized logins?
- Have users and administrators the right database access permissions?
Now follow these steps
- Click on the + icon in front of Security to expand drop-down options.
- Find a user with the front X sign because permissions are disabled for this user.
- Afterward, right-click on the specific user and choose Properties.
- Now select a page type as Status and press Ok to enable login for this user.
- After refreshing the list of users, please ensure the X Red sign will not appear.
- Thereafter, right-click on the user to continue and select Properties.
- Select a page type as General.
- Now enter a fresh new password and press the Ok button to apply.
Phase 5: User Mapping with SQL Database
This is the final step to fix SQL Server database error 18456. In this step, you need to ensure that the user has been assigned to a necessary role to access the SQL database.
- Right-click on the user and select Properties.
- Select a page type as User Mapping.
- Choose a specific database from the list of databases.
- Select necessary memberships from database role memberships.
- Click on the Ok button and finish.
Note That: We have discussed and mentioned steps to fix error 18456 SQL server database. But still, if you are still facing the same issue then you can also go with a professional solution for resolving queries like “how do I fix Microsoft SQL server error 18456”.
Know How to Fix Error 18456 SQL Server Using Software
If you are unable to fix SQL Server error 18456 by following the above-mentioned steps. Then use BitRecover SQL Password Recovery Wizard which is specially developed to fix login failed for user Microsoft SQL server 18456 error. This software is authorized for resolving all SQL password-related issues for individual users and organizations. Just watch the live video tutorial to out about this problem.
The Closure
In this informative blog post, we have discussed all the possibilities to fix SQL Server error 18456. We have explained 2 different methods for resolving queries like “how to fix login failed for user (Microsoft SQL server error 18456)”. First, you need to try manual approaches but if manual methods failed. Then deploy the suggested software and fix your problem instantly.