Fixing SYSPOLICY_PURGE_HISTORY job after SQL Server cluster setup
If you have just set up the SQL server 2008 cluster server you will find a job namely SYSPOLICY_PURGE_HISTORY already created under the jobs folder. By default it would be scheduled for daily run. The very next day if you see the job history you will find that this job has failed. If so then check the PowerShell script inside the job if it refers to the node name as below: (Get-Item SQLSERVER:\SQLPolicy\NodeName\DEFAULT).EraseSystemHealthPhantomRecords() Make this check as a part of you SQL Server Cluster setup checklist. To resolve the failure modify the script by replacing the NodeName with VirtualClusterName as below: (Get-Item SQLSERVER:\SQLPolicy\VirtualClusterName\DEFAULT).EraseSystemHealthPhantomRecords() This will resolve the issue.