Pausing a cluster node with a HADR environment SQL 2017 is getting failed through SQL JOB step.

Mahesh Kharawatkar 0 Reputation points

Pausing a cluster node in a HADR environment SQL 2017 is getting failed through SQL JOB step using a proxy account.

However it is succeeding if manually executed on the PowerShell ISE window with the proxy account even without administrator privileges, It doesn't seems to be a elevated permissions issue.

I have tried fixing the issue by adding the account in local administrator group and local security policy "Replace a process-level token" still it is getting failed. Can you please help fix it?

Error Message.:

Executed as user: PROD\UserAccount. The process could not be created for step 1 of job 0x59E3E9BB56FEA04CB5AC0456628AD770 (reason: A required privilege is not held by the client). The step failed.

Running below command as a powershell script through sql job step:

$localHost = [System.Net.Dns]::GetHostName()


#Initiating Node Drain before patching

Suspend-ClusterNode -Name $localHost -Drain

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,924 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 102.4K Reputation points

    My interpretation is that Agent is not able to create the Windows process to run the PowerShell script. Is this PROD\UserAccount a sysadmin account?

  2. Seeya Xi-MSFT 16,451 Reputation points

    Hi @Mahesh Kharawatkar ,

    The error message you are receiving indicates that the account used to run the SQL job step does not have the required privileges to execute the PowerShell script.

    You can add the account to the local administrators group on the SQL Server node. What is more, you can try to run the SQL Job step with a different proxy account that has the necessary privileges.

    Best regards,


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".