January 31, 2016 at 10:44 am
Hi,
We are using SQL server 2008R2 standard edition with 2 node active passive failover clustering.
The job is started failing after the failover.
Unable to start execution of step 3 (reason: The PowerShell subsystem failed to load [see the SQLAGENT.OUT file for details]; The job has been suspended). The step failed.
The binaries in both nodes are different paths. I copied the whole folder from node2 to node1 and try to run the job @step but it didn't start.
Do we need to restart the agent after copying the path from Node2 to Node1?
Is it best practice to do?
Even if we update the job might fail again after the failover
January 31, 2016 at 8:04 pm
Let me start by saying I don't know PowerShell.
The jobs are defined in msdb, which is some sort of shared storage. When you fail over, the active node picks up the msdb definitions of the jobs. If the job says to run step X by executing a PowerShell script stored somewhere on disk, that script file had better exist on disk or the job will fail.
Your script, therefore, will need to exist in the same physical path on node 1 and node 2 or the job won't work be able to work in both nodes. It could be on the shared storage or the local storage, but the path and filename need to be the same so the same command will work on either node.
January 31, 2016 at 8:45 pm
Please check this out: https://support.microsoft.com/en-us/kb/955726
This helped me some time ago.
Cause:
This problem may occur if the syspolicy_purge_history job uses the computer node name instead of the virtual server name for the cluster instance.
There are two options provided by Microsoft. Please check out the article.
See an old related post on this issue: http://www.sqlservercentral.com/Forums/Topic772839-146-1.aspx
-Regards,
February 1, 2016 at 12:40 am
I followed the step2 from MS but though it is failing.
Do we need to restart agent for any method?
I followed the same
But didn't find helpful. Still failing with the same error
February 1, 2016 at 5:27 am
Can you tell us anything else other than the fact that it failed?
Is PowerShell available on both servers?
Is the instance name correct in the PowerShell command?
Is the SQL Agent service running on the active node?
Have you looked at the SQL Agent service account?
You didn't give us an error message. Did you get one?
February 1, 2016 at 10:48 am
Yes powershell is running on Node1 and Node2
SQL Agent is running because the remaining jobs are running fine.
Error: Unable to start execution of step 3 (reason: The PowerShell subsystem failed to load [see the SQLAGENT.OUT file for details]; The job has been suspended). The step failed.
From SQL Agent.out Request to run job syspolicy_purge_history (from User ) refused because the job has been suspended
The step has the below code
if ('$(ESCAPE_SQUOTE(INST))' -eq 'MSSQLSERVER') {$a = '\DEFAULT'} ELSE {$a = ''};
(Get-Item SQLSERVER:\SQLPolicy\SQLVirtualname\SQLInstancename).EraseSystemHealthPhantomRecords()
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply