2011. 1. 11. 07:22

syspolicy_purge_history JOB 실패

  
SQL Server 2008 이 후

1. 클러스터 장비 일 경우
-  가상 서버 이름으로 되어야 하는데 그렇지 못한 경우 서버를 찾을 수 없다는 error
http://support.microsoft.com/kb/955726/ko

2. PowerSheell 오류

단계 3 실행을 시작할 수 없습니다(원인: PowerShell 하위 시스템이 로드하지 못했습니다[자세한 내용은 SQLAGENT.OUT 파일 참조]. 작업이 일시 중지되었습니다.).  단계가 실패했습니다.

 경로 확인

SELECT * FROM msdb.dbo.syssubsystems WHERE start_entry_point ='PowerShellStart'

agent_exe 결과 확인

C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\SQLPS.exe

해당 경로에 Tools\Binn 존재 하지 않습니다.

 경로 변경

Use msdb

go

 

exec sp_configure 'allow updates', 1 RECONFIGURE WITH OVERRIDE

 

UPDATE msdb.dbo.syssubsystems

SET agent_exe='D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\SQLPS.exe'올바르게 변경

WHERE start_entry_point ='PowerShellStart'

Agent Restart

-       agent 다시 시작 하지 않으면 저 경로 인식 하지 못합니다.

syspolicy_purge_history job 시작

 

 

참고)

해당 job은 한번 실행하고 나서 실패하면 다시 시작 할 수 없습니다.

job을 다시 삭제하고 만들어 주시던가, 아님 agent를 재 시작 해주셔야 합니다.

 job을 다시 만드는 법은 아래 구문 실행 해 주세요


DECLARE @jobId uniqueidentifier-- Obtain the current job identifier that is associated with the PurgeHistorySELECT @jobId = CAST(current_value AS uniqueidentifier)FROM msdb.dbo.syspolicy_configuration_internalWHERE name = N'PurgeHistoryJobGuid'-- Delete the job identifier association in the syspolicy configurationDELETE FROM msdb.dbo.syspolicy_configuration_internalWHERE name = N'PurgeHistoryJobGuid'-- Delete the offending jobEXEC msdb.dbo.sp_delete_job @job_id = @jobId-- Re-create the job and its association in the syspolicy configuration tableEXEC msdb.dbo.sp_syspolicy_create_purge_job
 


'SQL Agent' 카테고리의 다른 글

AGent::구성, 보안,Proxy  (0) 2010.06.04