1

I have been using SQL Server linked servers for years, and they have been working fine. But now when I try to run a query (on a machine with Windows 10) using linked server I get this error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

If I then run the same query on my older machine without Windows 10, I have no problems and never ever had any problems.

Now the funny part begins: If I run the query from my old PC (logged on with the same credentials) and then within 5 minutes run the same query from my Windows 10 machine - there is no problem!

It's like if my old machine establishes a connection that is open for about 5 minutes and then times out, and my Windows 10 machine cannot find out how to establish that connection.

Any ideas?

I am just running a query in SSMS logged onto server A querying data from a database on server B, and doing the same thing on both machines.

3
  • Are these local SQL instances on both machines? If so, I'd look at the 'Security' tab in the linked server properties. Are they the same? Commented Dec 9, 2016 at 18:48
  • Yeah, what are your security settings? Are you using the same methods of logging in/authorizing on both linked servers?
    – Iqbal Khan
    Commented Dec 14, 2016 at 19:30
  • Did you ever get a resolution here? I have the same issue: Connect using SSMS windows authentication to remote MSSQL server A, which has a linked MSSQL server B defined. Queries that only use server A are fine. Queries that involve server B return the "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'" error, but only if the workstation SSMS is connecting from is on Windows 10. Commented Mar 29, 2017 at 14:21

1 Answer 1

0

The error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'" means that SQL Server is not running under a service account on the new PC. Open the control panel, go to administrative and last open services. Look for SQL Server and see what it is logging in as. Create a Active directory account (sort of like an account for a person, except nobody should use it) and put the "domain\serviceaccount" and password into the login as tab. Be sure to grant "domain\serviceaccount" access to the remote server.

2
  • Hi thanx for answering. There are no service called 'SQL Server' - on neither the old or the new PC. Why is that service needed? I am supposed to use my own AD-credentials at - not a service account. It has never been an issue with my colleagues or with my own older PC (all using Win7)
    – Stewen
    Commented Dec 12, 2016 at 7:19
  • If there is no service called SQL Service then, it would be a named instance. please post the result of below query from SQL: select serverproperty('servername') Commented Jan 28, 2019 at 11:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.