Get IT Solutions

How to do IT
Menu
  • Home
  • SCCM 2012
    • Deploy Packages
    • Troubleshooting errors SCCM 2012
  • Windows
    • Applications Silent Install
    • Windows Tools
    • Windows Error
    • Script
    • Exchange Server
    • Troubleshooting Office
    • Applications Errors
  • Database
    • SQL Server
    • MySQL
    • Oracle
  • Cybersecurity
  • Other
  • Reviews

Sql server error 18456 – Troubleshoot Login Failed

Sql server error 18456 is common issue appear during login process on Microsoft SQL Server. This error can happen when you try to login with local administrator, as well as under the domain administrator and under the sa. Microsoft SQL Server login failed error can be encountered due to varied reasons. Most of the time, an error code comes up with a description that gives a hint about what has gone wrong. But I some cases the error come without any description. In this article, we’ll take a look at the typical reasons of the error 18456 appear on SQL Server during login process and show different ways to solve this error.

The view of error:

“Login failed for user ‘<user_name>’. (Microsoft SQL Server, Error: 18456)”.

"<yoastmark

How To FIX SQL Server Error 18456

Troubleshoot with Short Solutions

Here, you have some possible reasons:

  1. The login does not exist or was not typed correctly
  2. Make sure that the username or password are correct
  3. The password is incorrect
  4. The user forgot the password or login
  5. The Windows Authentication is not in Mixed mode
  6. A virus resets all the passwords
  7. A malicious hacker reset the password
  8. The logins were damaged or the master database is damaged
  9. The database was migrated, but the logins were not migrated
  10. The administrator modified the passwords by mistake
  11. Restart the SLQ Server service

 

Troubleshoot with State of the Microsoft SQL error 18456

Most of the time the SQL error 18456 come with the severity and state number. A state number might not mean much, yet it can offer more details as to what is wrong and where to look next.

To get a more detailed info about Microsoft SQL Server Error 18456 reason, you need to open the SQL Server error log file – ERROR.LOG. This is plain text file located under folder MSSQL\Log. Below are some states of the error 18456 sql server. The descriptions and potential solutions offer a quick explanation and potential troubleshooting guide.

 

 StateError Description
1Error information is not available. This state usually means you do not have permission to receive the error details
2Invalid user ID
5User ID is not valid.
6Attempt to use a Windows login name with SQL Authentication
7Login disabled
8Password is incorrect
9Password is not valid
11-12Valid login but server access failure
13SQL Server service paused
16Authorization is correct, but access to the selected database is not allowed
18Change password required
27Initial database not found
38Could not find database requested by user
 

102 – 111

AAD failure.
122 – 124Failure due to empty user name or password.
126Database requested by user does not exist.
132 – 133AAD failure.

 

Common Solution for Error 18456

If the issue cannot be resolved from with short solutions above, read below for additional information:

Read also other SQL Server Helping Posts:

  1. SQL Server Error 233
  2. Fix SQL server error 26 and error 40
  3. Restore Master Database

Checking the Server Authentication Mode

In this case you are trying to login on SQL Server using sql user. Once we login to SSMS using Windows Authentication, we need to check the security settings to confirm whether MSSQL is set up to allow both Windows and SQL Authentication.

Check and Change SQL Server Authentication Mode from GUI:

  1. In SSMS, right-click the Server Name at the top of the Object Explorer window and choose Properties.
  2. Next, click the Security page.
  3. If you find Windows Authentication is the only mode configured, this is the likely cause of sql server error 18456, Login failed for user ‘’.
  4. Setting the Server authentication mode to allow SQL Server and Windows Authentication, you will be able to login to MS-SQL with a SQL user and password or a Windows user and password. After making this change, you will need to restart the SQL Server service.

 

Server Authentication Mode

Server Authentication Mode

Change SQL Server Authentication Mode from regedit

You can use the registry to modify the authentication mode. Use the regedit to change the registry:

Image (regedit)

  1. machine\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\MSSQLServer
  2. Change the login mode value.
    1. 2 is mixed mode.
    2. 1 is Windows Authentication.
Change SQL Server Authentication Mode from regedit

Change SQL Server Authentication Mode from regedit

Checking pass expired or login disabled

Check out that the password is not expired.

  1. Open SSMS, Instance – Security – Logins and find the user that have issue
  2. On general tab check if the Enforce password expiration and enforce password policy are checked
  3. Un-check them

Check out that the login is enabled.

  1. Open SSMS, Instance – Security – Logins and find the user that have issue
  2. On status tab and check if is selected the “Enabled” option

 

Reset the Password of the user

If you forget your password, you can ask your DBA to reset your account. The easiest way to reset the password is by using SQL Server Management Studio (SSMS).

  1. Go to security and Logins:
  2. Select the login and you can change the password:
Checking pass expired or login disabled

Checking pass expired or login disabled

  1. If you do not like to use SSMS, you can use T-SQL to create users and change the password:

USE [master] GOALTER LOGIN [Test] WITH ‘newpasswordtest’GOChange Windows Authentication

 

So we hope that you fixed the issue with the sql server error 18456.

Share
Tweet
Google+
Pinterest
Linkedin
Stumble
Email
Prev Article
Next Article

Related Articles

slq server move data files
Sometimes we need on SQL Server move database files to …

Sql server move database files to another drive in fastest way – data and log

The execute permission was denied on the object
The following article will handle “the execute permission was denied …

The execute permission was denied on the object – SQL Server Error

Best Computers & Laptops

Best Computer for Cyber Security – Laptop and Desktop
Best Computer for Cyber Security
Hey, are you seeking the best computer for cyber security? Well, we must say you have come to the right place to find your answer and guidance. There are a plethora of products out there for you to pick from ...
Read More
Best Computer for Microsoft Office & Excel – Laptop and Desktop
Best Computer for Microsoft Office & Excel
Are you finding the Best Computer for Microsoft Office and Excel? In modern days, the best laptop or desktop set is the one which is both portable, has good looks and offers the smoothest performance. Microsoft Office is a package ...
Read More
Best Computer for Hacking – Laptop and Desktop Selection
Best computer for Hacking
When it comes to hacking, either laptop or desktop, choosing the best computer for hacking would be an exhilarating job. There are many specifications to be considered for hacking ...
Read More

SQL Server Tips

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax
Sqlstate 42000 Is a general code that come together with other number. Most often comes with the code 1064 and ...
Read More
The execute permission was denied on the object – SQL Server Error
The execute permission was denied on the object
The following article will handle “the execute permission was denied on the object” error appears on SQL Server. This error ...
Read More
How to Read Data from LDF file in SQL Server – A Complete Guide
Read LDF File
Hello Everyone, Today we are going to address the most popular query of SQL users, how to read data from ...
Read More

Search

We are on:

Get FREE SPACE for your PC

3 Method to Delete Temp Files in Windows 7/10 including vbs script

In this post we will explain how to delete temp files windows 7 using three different methods including vbs script ...
Read More

Fastest way to delete hiberfil sys from windows 10/8/7 and XP – CMD

In this article we will explain how to remove or delete hiberfil sys from Windows 10/8/7 and XP . If you does ...
Read More

Learn How to Silent Install Applications

Silent Install Adobe Flash Player
In this tutorial will explain how to silent install adobe flash player 25, Msi and Exe version. How to disable auto update and uninstall older ...
Read More
Java Silent Install and Uninstall Older Version – Deploy Package MSI
This tutorial will explain how to silent install Java MSI/EXE version and disable auto-update. The command line will also uninstall the ...
Read More
Silent Install Adobe Shockwave Player 12 and disable update
In this tutorial will explain how to silent install Adobe Shockwave Player 12 msi and disable auto update. The command will uninstall older ...
Read More
Silent Install Google Chrome MSI, Silent Uninstall and Disable Auto Update
This tutorial will explain how to silent install Google Chrome MSI and disable auto update. The command will uninstall older version of ...
Read More
Silent Install Adobe Reader 11 and DC – msi and exe – disable update
In this tutorial will explain how to silent install Adobe Reader version 11 and DC. We will user both version "msi" ...
Read More
Silent Install Mozilla Firefox msi and exe file – Including Silent Uninstallation
This tutorial will explain how to silent install Mozilla Firefox. We will use MSI and EXE files to perform a silent ...
Read More
Skype Silent Install Msi and disable updates
In this tutorial will explain how to silent install skype  and disable auto update. The command will uninstall older version of Skype and ...
Read More
Filezilla Silent Install msi and exe version
Filezilla silent install tutorial will explain how to perform a silent installation of application. We will explain methods, silent install ...
Read More
Silent install VLC Media Player
In this tutorial will explain how to silent install VLC Media Player. We will explain both methods for exe and ...
Read More
Notepad++ silent install exe and msi version – Command Line
Notepad++ silent install is the new article from a series of silent installations. Notepad++ as free software has two main ...
Read More

Batch File Solutions

How to list files in cmd – Command Prompt – Windows 10
Whenever you want to search and make a list of all files on a specific folder, you used the windows ...
Read More
Batch rename multiple files in folder – CMD script – Bulk Method – Win 10
The following article will teach how to rename multiple files in a folder with the bulk method using Command Line ...
Read More
Batch script rename file using Command Line (CMD) & PowerShell – Windows 10
The following article will use the “rename” or “ren” command to rename the file using a command prompt. Also, we ...
Read More
Change extension of multiple files at once – CMD batch file
The following article will teach the methods to change the extension of multiple files at once using command prompt and ...
Read More
How to delete registry key with command line | PowerShell | Batch
The following article is the third of series about registry and working on it through command line (CMD) and PowerShell ...
Read More
How to add registry key & values with CMD | PowerShell | Batch
The registry is the place where most of the applications store the settings but not only. Used also from the ...
Read More
Unmap Network Drive CMD – (Batch file) – net use delete command
After we posted the methods to map network drive using cmd commands we come this time with the method to ...
Read More
Map Network Drive cmd (batch file) – net use user password
This article will focus on another way to map a network drive on your computer instead of from the explorer ...
Read More
How to Find Large Files on Windows 7 & 10 – CMD Forfiles Command
If the capacity of your hard drive is running low, it is time to clean off some files and to ...
Read More
CMD Script to check disk space on windows and multiple remote servers
The following article will provide you script to check disk space. The Script monitor space on windows and multiple remote ...
Read More

Get IT Solutions

How to do IT

About Us

Get IT Solutions is a personal blog, which is managed to guide people for various topic.

Second Menu

  • Donate
  • About Us
  • Contact Us
  • Privacy Policy

What Will You Find

Automation is our area of writing where are included scripts, batch and various tips to automate your daily job.
Copyright © 2025 Get IT Solutions