none
Login failed for user. Microsoft SQL Server, Error: 18456

    Question

  • Hi,

    I have a windows 2008 with SQL Server 2008 R2 VM on Azure. I am trying to connect to the SQL server for the first time using SSMS, but have not been able it. I have a VPN tunnel, so I am connecting using Windows authentication. The error I get back from SSMS is:

    Login failed for user 'domain\username'. (Microsoft SQL Server, Error: 18456)

    In the event viewer I see this error message:

    Login failed for user 'domain\username'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]

    I have done the following:

    - created an endpoint for port 1433

    - opened port 1433 in the firewall

    - Ran the MSSQLSERVER service as the build-in users Network Services, Local System, and Local Service, and as a local and domain administrator, with the same exact result each time.

    - I get the same result trying to connect locally or remotely.

    - I get the same result trying to connect using sqlcmd.

    - None of the suggestions in the related worked.

    Any thoughts on how I can resolve this issue?

    Thanks,

    MH

    • Moved by Olaf HelperMVP Friday, March 21, 2014 7:40 AM Moved from "SQL Database Engine" to a more related forum
    Friday, March 21, 2014 12:15 AM

Answers

  • Hi,

    The issue has been resolved.

    When I was having the problem, I was logging into the server using RDP and my personal account, not the original account that built the server. To resolve the issue, I had to login to the server using the original account that built the server. From there, I was able to login to the database server using SSMS and windows authentication. Then was I was able to change the server authentication mode, change the sa password and make other configuration changes.

    Thanks.

    • Marked as answer by mhannaoui Friday, March 21, 2014 6:51 PM
    Friday, March 21, 2014 6:51 PM

All replies

  • Hi,

    Did you add your IP to the SQL Server Rules?

    if not, go to https://manage.windowsazure.com

    Databases > Select the Server > Add the IP Address range

    --------------------------------------------------------------------------------

    If you found this post useful, Please "Mark as Answer" & "Vote as Helpful". Best Regards.

    Friday, March 21, 2014 6:52 AM
  • Tuan, thanks for your response, but I believe it does not apply to my setup. I am using an Azure VM with SQL Server installed on it, and not an Azure SQL database.
    • Marked as answer by mhannaoui Friday, March 21, 2014 6:45 PM
    • Unmarked as answer by mhannaoui Friday, March 21, 2014 6:45 PM
    Friday, March 21, 2014 5:18 PM
  • Hi,

    The issue has been resolved.

    When I was having the problem, I was logging into the server using RDP and my personal account, not the original account that built the server. To resolve the issue, I had to login to the server using the original account that built the server. From there, I was able to login to the database server using SSMS and windows authentication. Then was I was able to change the server authentication mode, change the sa password and make other configuration changes.

    Thanks.

    • Marked as answer by mhannaoui Friday, March 21, 2014 6:51 PM
    Friday, March 21, 2014 6:51 PM