文章日志
日志类别:数据库
2014-11-15 00:42

方法 1: 编辑 syspolicy_purge_history 作业

编辑步骤 3 中的syspolicy_purge_history作业。
  1. 启动 SQL Server 管理 Studio。
  2. 展开SQL Server 代理,然后再展开作业
  3. 用鼠标右键单击syspolicy_purge_history,然后单击属性
  4. 单击步骤
  5. 单击擦除虚拟系统健康记录,,然后单击编辑
  6. 命令框中,使用群集实例的虚拟服务器名称替换计算机节点名称。
  7. 单击确定,然后单击关闭

方法 2: 重新创建 syspolicy_purge_history 作业

若要重新创建的syspolicy_purge_history作业,请运行下面的事务处理 SQL 语句。
DECLARE @jobId uniqueidentifier

-- Obtain the current job identifier that is associated with the PurgeHistory
SELECT @jobId = CAST(current_value AS uniqueidentifier)
FROM msdb.dbo.syspolicy_configuration_internal
WHERE name = N'PurgeHistoryJobGuid'

-- Delete the job identifier association in the syspolicy configuration

DELETE FROM msdb.dbo.syspolicy_configuration_internal
WHERE name = N'PurgeHistoryJobGuid'

-- Delete the offending job
EXEC msdb.dbo.sp_delete_job @job_id = @jobId

-- Re-create the job and its association in the syspolicy configuration table
EXEC msdb.dbo.sp_syspolicy_create_purge_job


0    0
昵称: