How to Fix Login Failed for User (Microsoft SQL Server, Error: 18456) Step-By-Step – Add SQL Administrator to SQL Management Studio

Direct answer

In this post (and video), I will teach you how to determine what user has administrative rights on the server as well as walk you Step-By-Step how to configure SQL Server to allow other users to login as Administrators to SQL Server. The generic message “Login Failed for User (Microsoft SQL Server, Error: 18456)” means […]

In this post (and video), I will teach you how to determine what user has administrative rights on the server as well as walk you Step-By-Step how to configure SQL Server to allow other users to login as Administrators to SQL Server. The generic message “Login Failed for User (Microsoft SQL Server, Error: 18456)” means you entered invalid credentials when logging into SQL Server.

Video is short but has additional tips and tricks so watch the video to get the FULL STORY!

> _Video no longer available -- originally hosted on Channel 9 (Microsoft's developer video service, retired 2021). No archived copy could be recovered._

In the below screen shot, I am logging into Microsoft SQL Server Management Studio with a user that does not have administrative permissions to connect to the server.

[

SQL Server Error 18456 screen shot

](/wp-content/uploads/2014/09/SNAGHTML1d3c8af8.png)

You need to figure out what user does have rights to SQL server. Usually this is the user that you logged in with when you installed SQL Server or the user that is the default administrator on the computer. To get a list of users on the machine (Assuming Windows Server 2012 or above)

***Step-By-Step***

Launch Server Manager – Start – Click Server Manager [

image

](/wp-content/uploads/2014/09/image8.png)

In the upper right corner, click Tools, then Computer Management

[

image

](/wp-content/uploads/2014/09/image9.png)

Expand Local Users and Groups (Under Computer Management-System Tools) then click Users

Notice under Description… There is a Built-in account for administering… This is very likely an account that has access to SQL server. Try logging onto windows with that account that is Built-in account for administering then we can grant rights to the user you want to use to login to SQL Server.

[

SNAGHTML1d5b769e

](/wp-content/uploads/2014/09/SNAGHTML1d5b769e.png)

Now that you are logged into Windows with an account that has access to connect to SQL Server, Let’s go in and grant rights to the user that you want to be able to use to access SQL Server.

***Step-By-Step***

Launch SQL Server Management Studio again and you should be able to Connect

[

image

](/wp-content/uploads/2014/09/image10.png)

Expand your ServerName, then Expand Security, then Logins. Click Logins

Right-Click Logins Select New Login…

[

image

](/wp-content/uploads/2014/09/image11.png)

Click the Search Button

[

image

](/wp-content/uploads/2014/09/image12.png)

Type in the Windows User Name you would like to add as an SQL Administrator then click Check Names (or you can click advanced and select from a list)

[

image

](/wp-content/uploads/2014/09/image13.png)

Click Server Roles in the left pane; then turn on the sysadmin checkbox, then click OK

[

image

](/wp-content/uploads/2014/09/image14.png)

You can then confirm you have sa rights by double-clicking the user name in the left Object Explorer and clicking on Securables

[

image

](/wp-content/uploads/2014/09/image15.png)

Now you can log out of Windows, login as the user you just granted rights to and all should work fine.

Dan Stolts

Founder and Chief AI Officer of Just In Time AI, with an IT career that began in 1988 -- nearly four decades of experience. Over a decade of that career went into building ITProGuru into a 250,000-uniques/mo IT-community resource, and he now applies the same teach-first approach to AI systems that run real businesses. Full profile →