Skip to content
Tutorial Gateway
  • C
  • C#
  • Python
  • SQL
  • Java
  • JS
  • MySQL
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs
    • Search
SQL Server Login Error 9

SQL Server Login Error

Login with SQL Server Authentication is throwing an error is a standard interview question. So, in this article, we will show you the step-by-step approach to resolving Login Error. First, Let me show you the error. From the below screenshot, you can see the Login Error for user Suresh.

Error Message 18456

Before we start doing anything to resolve login errors, let me show you the list of available logins in our Management Studio. From the below screenshot, you can see that the Sql Server user exists. I suggest you refer to Create a Login article to understand the steps to create users.

SQL Server Login Errors to Access

If your account doesn’t have permission to log in, right-click on the Username and select properties from the context menu.

Go to properties in Object explorer security 3

Selecting the properties option will open the following window

User General Tab 4

Under the status tab, check the permissions

  • Grant: Granting permission to users to connect with the database engine
  • Enabled: Enable this user to login with his / her details
Check Status Settings - Permission Grant or Deny 5

In most cases, the above-mentioned method will resolve the errors.

Sql Server Authentication Login Error Fix

In some cases, your database will accept only windows authentication. In these cases, you have to change the authentication mode to dual. Right-click on the instance name and select the Properties option from the context menu

Right-Click on Server Instance and choose properties 6

It opens a properties window

Properties Window 7

Please navigate yourself to the Security tab. From the below screenshot, you can see that the Server Authentication is selected in Windows Authentication Mode. It means it only accepts local windows users.

Change the Server Authentication from Windows Mode 8

Please change the option to SQL Server and Windows Authentication Mode option

SQL Server Login Error Authentication Mode 9

Click Ok. Remember, configuration changes will take effect only after the restart. So, restart the instance

Click Ok button to apply changes 10

Try with Username Suresh and server authentication.

Log in With server credentials 11

We successfully entered into the management studio.

Management Studio 12
Back to Categories SQL
Python Program to Print Odd Numbers from 1 to N
Connect to SQL Server using sqlcmd utility

Related Topics

  • Management Studio Intro
  • Connect with cmd utility
  • Attach Database
  • Detach Database
  • Backup Database
  • Restore Database
  • Restore Database using BAK
  • Rename Database with Files
  • Get Database Names
  • Create Table
  • Alter Table
  • Get Table Names in a DB
  • Global & Local Temp Table
  • Table Variable
  • Derived Table
  • DML, DDL, DCL & TCL Cmds
  • Query Builder
  • ALIAS
  • SELECT
  • DISTINCT
  • SELECT INTO
  • INSERT
  • INSERT INTO SELECT
  • BULK INSERT or BCP
  • UPDATE
  • UPDATE from SELECT
  • DELETE
  • TRUNCATE
  • CASE
  • MERGE
  • Subquery
  • CTE Example
  • PIVOT
  • UNPIVOT
  • TOP Clause
  • WHERE
  • ORDER BY
  • GROUP BY
  • Having
  • Primary Key
  • Foreign Key
  • Referential Integrity
  • Check Constraint
  • Unique Constraint
  • Default Constraint
  • Clustered Index
  • Non Clustered Index
  • Filtered Indexes
  • COALESCE Function
  • IS NOT NULL
  • IS NULL Function
  • ISNULL
  • Types of JOINS
  • CROSS JOIN
  • FULL JOIN
  • SELF JOIN
  • Outer Joins
  • LEFT JOIN
  • RIGHT JOIN
  • AND & OR Operators
  • Arithmetic Operators
  • BETWEEN
  • Comparison Operators
  • LIKE
  • EXCEPT
  • EXISTS Operator
  • NOT EXISTS Operator
  • INTERSECT
  • IN Operator
  • UNION
  • UNION ALL
  • IF ELSE
  • ELSE IF
  • WHILE LOOP
  • BREAK
  • CONTINUE
  • GOTO Statement
  • IIF Function
  • CHOOSE
  • Change Data Capture
  • Table Partitioning
  • TRY CATCH
  • VIEWS
  • User Defined Functions
  • Stored Procedures
  • Useful System Stored Procedures
  • Triggers
  • Cursors
  • TRANSACTIONS
  • ACID Properties
  • Maintenance Plan
  • Ranking Functions
  • Aggregate Functions
  • Date Functions
  • Mathematical Functions
  • String Functions
  • CAST Function
  • TRY CAST
  • CONVERT
  • TRY CONVERT
  • PARSE Function
  • TRY_PARSE Function
  • Calculate Running Total
  • Find Nth Highest Salary
  • Reverse String
  Copyright © 2023. All Rights Reserved.
Home | About | Contact | Privacy Policy