데이터베이스 개발자 Tip & 강좌
SQL Server 2008SQL Server Agent Job syspolicy_purge_history job . Job MSDB . Job , .
Date7/29/2019 1:23:41 PM
LogJob History (syspolicy_purge_history)
Step NameErase Phantom System Health Records.
Sql Message ID0
Operator Net sent
Executed as user: NT Service\SQLSERVERAGENT. The job script encountered the following errors. These errors did not stop the script:A job step received an error at line 1 in a PowerShell script. The corresponding line is 'import-module SQLPS'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'The specified module 'SQLPS' was not loaded because no valid module file was found in any module directory. ' A job step received an error at line 1 in a PowerShell script. The corresponding line is 'SQLSERVER:'. Correct the script and reschedule the job. The error information returned by PowerShell is: 'The term 'SQLSERVER:' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. '. Process Exit Code -1. The step failed.
Job Powershell .
PATH , . PATH SQL .
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShell\Modules
, [My Computer] – [right click] – [Properties] [Advance] [Environmeont Variables] . PSModulePath PATH ( ) .
, SQLPS PATH . SQL Agent Job .
2019-08-07 / Sungwook Kang / http://sungwookkang.com
SQL Server, Agent job, sysploicy_purge_history , Agent, PSModulePath, Erase Phantom System Health Records
출처: https://sqlmvp.tistory.com/1330?category=618825 [Database Lab]