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!
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.
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)
Launch Server Manager – Start – Click Server Manager
In the upper right corner, click Tools, then Computer Management
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.
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.
Launch SQL Server Management Studio again and you should be able to Connect
Expand your ServerName, then Expand Security, then Logins. Click Logins
Right-Click Logins Select New Login…
Click the Search Button
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)
Click Server Roles in the left pane; then turn on the sysadmin checkbox, then click OK
You can then confirm you have sa rights by double-clicking the user name in the left Object Explorer and clicking on Securables
Now you can log out of Windows, login as the user you just granted rights to and all should work fine.