SQL Server: Fix error 18456 - Here's how
Related Videos: How to Fix Login Failed for User (Microsoft SQL Server 2017, Error: 18456) (May 2024).
If you get error 18456 on your SQL Server, there is a problem logging in with the user name. We will show you how to solve the matter quickly and easily here.
SQL Server error 18456 - possible causes and solutions
SQL error 18456 denotes a user login error. The message specifically concerns the user name. There are various reasons why the error message appears.
- For example, your username or password is invalid. Therefore, check whether a typo has crept in.
- The error also appears if you have used an existing Windows user name as the SQL user name. This is not allowed and leads to an error message.
- The account may also be deactivated. In this case you can of course not log in.
- If a change in the password is required according to the password policy of the SQL server, you must first make this change in order to be able to log in again without this error message.
- If the database is currently being restored, the error message also appears when trying to access the database. You have to wait here and try again later.
- It is also possible that the correct authentication option was not set when the database software was installed. We'll show you how to solve this problem in the next section.
SQL Server Error 18456: Verify Authentications
The default setting for installing the SQL software is Windows authentication. You should therefore check whether additional SQL users are allowed, ie the so-called "mixed mode" is activated.
- To check this, start the "Microsoft SQL Server Management Studio" utility.
- Once you have connected, right-click on the server name at the top and select "Properties" to open the "Server Properties" dialog box.
- In the next step, click on "Security" in the left bar.
- Now you will see the item "Server authentication" at the top of the right window. Mark the "SQL Server and Windows authentication" option and confirm your change with "OK".
- For the change to take effect, you must now restart the SQL Server service.
Creating SQL databases on Mac is not quite as easy as under Windows, but is still possible. We will show you how in the next practical tip.