Task scheduler from remote server gets Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

  • Hi,

    I have a SQL 2016 and on a remote server I have an executable in Task Scheduler that runs an update. If I run that executable manually, everything is fine. On a scheduled task, it fails with "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'". I attempted to use "Credentials" and "Proxies"(Operating System), added in Principals(NT AUTHORITY\NETWORK SERVICES and DOMAIN\SERVER$). Same error. 

    Is this possible to be done?

    Thank you,

    dg

  • Who is the scheduled task running as? NT AUTHORITY\ANONYMOUS LOGON login failures always boil down to the user in question not being able to be authenticated across the network.

    In this case, if your scheduled task is running as a local system user, then it will not be able to authenticate beyond the boundary of the machine it is running from and you will get this error. Try using NETWORK SERVICE.

    On a side not, why not simply schedule the update to occur directly on the SQL Server using a SQL Agent job?

  • I did run the Task as a privileged account and lastly I tried with the domain account just to test. I can see the connection on the SQL Server but nothing happens. Read, writes are 0. The tasks just stays there and does nothing. The account is sysadmin on that instance.

    Your side note came to my mind as well, but the SQL Server is a cluster of three nodes with SAN attached storage. I will attempt to contact those that wrote the app and see if they can help. It was initially used on a Windows 2008R2 and now it is a Windows 2016 Server.

  • Could this be an issue with the SPN not being registered properly? Might try the Kerberos Config Manager, you can also run this script to see if it is using Kerberos or NTLM

    SELECT net_transport,

    auth_scheme

    FROM sys.dm_exec_connections

    WHERE session_id = @@spid;

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply