Troubleshooting SYSPOLICY_PURGE_HISTORY Job Failure in Failover Cluster Instance of SQL Server 2008


Jun 07, 2012

Introduction

This article describes troubleshooting steps for SYSPOLICY_PURGE_HISTORY SQL Server Job failure in Failover Cluster Instance of SQL Server 2008. In case of SYSPOLICY_PURGE_HISTORY  Job has failed in a Stand-Alone Instance of SQL Server 2008 then refer the following article titled "Troubleshooting SYSPOLICY_PURGE_HISTORY Job Failure in Stand Alone Instance of SQL Server 2008"

SYSPOLICY_PURGE_HISTORY Job fails in Failover Cluster Instance of SQL Server 2008

The SYSPOLICY_PURGE_HISTORY Job fails with the below mentioned error at step 3 “Erase Phantom System Health Records” of a Failover Cluster Instance of SQL Server 2008. The reason why this job is falling at Step 3 “Erase Phantom System Health Records” is within the PowerShell script still SQL Server Node Name is mentioned. To resolve this issue you need to replace the SQL Server Node Name with the SQL Server Virtual Name.

Error Message

Executed as user: Domain\UserName. A job step received an error at line 1 in a PowerShell script. The corresponding line is '(Get-Item SQLSERVER:\SQLPolicy\MYTECHMANTRACLUSB\DEFAULT).EraseSystemHealthPhantomRecords()'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Failed to connect to server . A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) '. Process Exit Code -1. The step failed.

Wrong Value of SQL Server Virtual Name in Erase Phantom System Health Records job step

(Get-Item SQLSERVER:\SQLPolicy\SQLServerNodeName\DEFAULT).EraseSystemHealthPhantomRecords()

Resolution

Correct Value of SQL Server Virtual Name in Erase Phantom System Health Records job step

(Get-Item SQLSERVER:\SQLPolicy\SQLServerVirtualName\DEFAULT).EraseSystemHealthPhantomRecords()

You need to make the changes to the PowerShell script and then click OK to save the change to SYSPOLICY_PURGE_HISTORY Job as shown in the snippet below.

SYSPOLICY_PURGE_HISTORY Failure on Failover Cluster Instance of SQL Server 2008

Conclusion

In this article you have seen troubleshooting steps for SYSPOLICY_PURGE_HISTORY Job failure in Failover Cluster Instance of SQL Server 2008.

Continue Free Learning...

  • Please leave below your valuable feedback for this article.
  • Feel Free to refer this article to your friends and colleagues using the below “Share this Article” option.
  • Do subscriber to our News Letter to continue your free learning.
  • Don’t forget to Like Us on Facebook and do follow us on Twitter for latest updates.

Share this Article


Geeks who read this article also read…



Follow @MyTechMantra on Twitter
We're on Facebook
Bookmark and Share

"Receive newsletters and special offers about SQL Server, BizTalk and SharePoint from MyTechMantra. We respect your privacy and you can unsubscribe at any time."