I have a SQL Server Agent job that is set to run as a domain user. It runs a node command and had been working with no issues for months.
Now every few days it fails to run with the following error
'The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program.'
It appears that it is failing to execute as the domain user. We can jump on and manually kick the job off and everytime that works.
@@VERSION: Microsoft SQL Server 2019 (RTM-CU22-GDR) (KB5029378) - 15.0.4326.1 (X64) Aug 18 2023 14:05:15 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
Any ideas on what the solution could be?
-
Who is the owner of the job?J. Mini– J. Mini2024年01月24日 08:19:38 +00:00Commented Jan 24, 2024 at 8:19
-
I am. I've created the job and set the step to operating cmd and set the run as user of that to myself.Chris Herring– Chris Herring2024年01月24日 09:57:59 +00:00Commented Jan 24, 2024 at 9:57
-
Does the account that owns the job have permissions on the node? It may not be the same account as the one that you use when you try to do the task manually.J. Mini– J. Mini2024年01月24日 10:56:32 +00:00Commented Jan 24, 2024 at 10:56
-
Same account, I only have one login for the server so I've tied everything to that.Chris Herring– Chris Herring2024年01月24日 11:40:36 +00:00Commented Jan 24, 2024 at 11:40
1 Answer 1
to my mind, the network token fails to renew, logging on to the server refreshes the token, and after it expires, it fails. Has your domain user got Login as a Service permissions? https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/log-on-as-a-service