SQL SERVER 2005 – FIX Error: 18456 : VISTA Windows Authentication

In previous post I have mentioned about SQL SERVER 2005 – Vista Ultimate and SQL Server 2005 DEV Edition. There was one simple issue with the installation. I was not able to login using windows authentication method. I was able to successful login using sa username and password.

I kept on receiving following error.

TITLE: Connect to Server
Cannot connect to SQLAUTHORITY.

Login failed for user ‘SQLAUTHORITY\Pinal’. (Microsoft SQL Server, Error: 18456)

For help, click:


After a while I realize that this may be due to one needs Administrator rights to do any task in SQL Server. I added the my current login as administrator in SQL Server and next time I was able to login successfully using Windows Authentication.

Following diagrams explains the fix.

1. Error while using Windows Authentication

SQL SERVER 2005 - FIX Error: 18456 : VISTA Windows Authentication vistaauth

2. Login using SA username and password and go to Security >> New Login

SQL SERVER 2005 - FIX Error: 18456 : VISTA Windows Authentication vistaauth1

3. Type In Login Name as ComputerName\UserName

SQL SERVER 2005 - FIX Error: 18456 : VISTA Windows Authentication vistaauth2

4. Click Server Roles and check sysadmin server role, after that click OK.

SQL SERVER 2005 - FIX Error: 18456 : VISTA Windows Authentication vistaauth3

5. Now login using Windows Authentication and it should work fine.

SQL SERVER 2005 - FIX Error: 18456 : VISTA Windows Authentication vistaauth4

Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Error Messages, SQL Server Security, Vista
Previous Post
SQL SERVER – Find Table in Every Database of SQL Server – Part 2 Extension
Next Post
SQL SERVER – Create Database Error in Windows Vista

Related Posts

106 Comments. Leave new

  • Greate man My problem solve aftetr a long time.
    Thanks very much

  • User “Company\admin” exists in the Windows Administrator group and also available in the SQL server logins but I am still getting the 18456 error, Login failed for user ‘Company\admin’ [CLIENT: ].

    Any help would be appreciated.

  • Had the error 18456 problem. This forum got me the idea that it was indeed a security issue that didnt allow me to log on to the database server (analysis was working fine). So closed it, and restarted with a right click -> run as administrator. Now works like a charm :) easy fix

  • Thanks a lot. Keep it up!!!

  • Heloo

    i am using windows7 with sql server 2008.

    My problem is i couldn’t login by sql server authentication

    but i can login by using windows authentication.

    If i try to login by sql server authentication login error occurred. The details are given below…. I hope help from here..

    Error Number: 18456
    Severity: 14
    State: 1
    Line Number: 65536

    Thanks in advance…


  • hello my freinds

    if you couldn’t login by sql server authentication and you have this error ( Error Number 18456)

    this is the solution for your problem

    english : https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/change-server-authentication-mode?view=sql-server-2017

    francais :


  • thanks .. i was looking for this solution from long time..

  • Nitesh Dwivedi
    July 2, 2010 5:49 pm

    i right clicked on sql server management studio and clicked on run as administrator. Now problem is resolved, thanks a lot.

  • i found this solution very helpful. I have resolved my problem of login as ‘windows authentication’ by viewing the given demo. thanks alot.

  • Run as administrator On win 7 ;)

  • good solution. It solved the windows authentication mode login issue

  • sahil singh
    May 2, 2011 1:51 pm

    i have sucessfully connected to the the server but when it comes to database attatchment there is a error as

    “cannot attatch a database with the same name as an existing database”

  • GOOD…….

  • Sir ,

    I have problem in architecture for sql 2005/2008 server can any one suggest the site

  • Ossssom thnxxxxxxxxxxx a lot sir it really worked i hav been facing this problm quit long time ago but was never able to figureout what exactly is going wrong and how to handle it but now itz jus a matter of fun………….

  • Thanks

  • thanks a lot for ur guide……

  • I am not unble access by Sa login .

  • no yaar its not working any other better solution for this error 18456 please do the need full for me thank u sir

  • Please help…

    same error for two SQL server 2008 R2 , on same computer (virtual PC), i can’t connect two server’s always same error.
    Maybe is problem in “name path” server MACHINENAMESERVERNAMEUSER (login)

    please help!


    • What is the actual error message you got? Also why are you having the same version twice in the PC?

      • Because i think that the best way to connect and learn about connection (two or more DT servers) is if i had two equally system (OS and server)…
        Now am stuck here, regardless of reading and doing stuff from luts of tutorial.

        thx for replay…

        i still can’t connect two server’s

Leave a Reply