The SQL Server Error 18456, also acknowledged as Microsoft SQL Server Error 18456, occurs when you get a rejection for your connection attempt to the server due to the failure of your authentication. Invalid credentials, selection of the wrong authentication mode, and password expiration can cause authentication or login failure. In several cases, the server error code 18456 on Microsoft SQL has a description. Sometimes, the error may appear without a description. Here are some examples of the Microsoft SQL Server Error 18456:
- Login failed for user ‘<username>’ or login failed for user ‘<domain>\<username>’
- Login failed for user ‘NT AUTHORITY\ANONYMOUS’ LOGON
- Login failed for user ’empty’
- Login failed for user ‘(null)’
There is no specific solution to this error. However, you can fix this error as per what message you see with the code. Here are some potential solutions to SQL Server Error 18456:
Check for the SQL Server Authentication Mode
Step 1: Check what authentication mode is enabled – Windows Authentication Mode or SQL Server Authentication Mode
Step 2: Go to the Object explorer window located at the top.
Step 3: Right-click on the option – Server Name.
Step 4: Choose Properties. After that, click on the Security Page.
Step 5: Enable the SQL Server Authentication Mode if the server is set to the Windows Authentication.
Step 6: After making this change, restart the SQL Server Service.
Start the SQL Service
- Right-click the Server Name that lies at the top of the Object Explorer window. After that choose Restart. It will enable the new authentication mode.
Connect your device to a remote desktop
Step 1: Tap on the Start button or Windows icon on your computer.
Step 2: Type the Run in the search bar to open the Run app.
Step 3: Type mstsc in the box and press the Enter key.
Step 4: Place the server IP address in the option next to Computer.
Step 5: Tap on the Connect option. It will open the Windows login screen if everything goes well.
Open the Microsoft SQL Server Management
Step 1: Log in to the SSMS server.
Step 2: Run Microsoft SQL Server Management Studio.
Step 3: Wait until you see the server prompt screen after launching SSMS.
Step 4: Use either the SQL Administrator or the Windows Administrator account to login.
Step 5: Install and configure MSSQL
Monitor SQL User Permissions
Step 1: Expand the Security page.
Step 2: Go to the SSMS Object Explorer and expand Logins.
Step 3: Look for the user having login issues. This user has a cross mark.
Step 4: Right-click that user and go to Properties. Enable login for the user.
Step 5: Go to the Status Page.
Step 6: Tap on the OK option to make the user login.
Step 7: Verify no user has a red cross mark.
Step 8: Right-click the user and move ahead for troubleshooting the user.
Step 9: Tap on the General page/tab after choosing Properties.
Step 10: Type a new strong password. After that, tap OK.
Step 11: Login with the new password.
Connect the User to the Database
Step 1: Do right-click on the user.
Step 2: Move to Properties, and then, User Mapping Page.
Step 3: From the list of databases, choose a database.
Step 4: From the database role memberships, select the desired/needed memberships.
Step 5: Tap the OK button.
Enable Contained Databases
Step 1: Go to SSMS.
Step 2: Choose Properties after right-clicking on the SQL Server.
Step 3: Set the Enable Contained Databases option to True after going to the Advanced page.
Correct the Login Details
Step 1: Check for the existence of the SQL Server login details you have entered.
Step 2: Create a login if there is no login.
Step 3: Correct the login details in the application connection string if a login exists but it is misspelled.