장기 실행 작업

Microsoft.SQLServer.2012.Agent.LongRunningJobs (UnitMonitor)

이 모니터는 장기 실행 SQL 에이전트 작업을 확인합니다.

Knowledge Base article:

요약

이 모니터는 장기 실행 SQL 에이전트 작업을 확인합니다. 구성된 임계값보다 작업이 오래 실행되면 경고나 오류가 발생합니다.

원인

비정상 상태는 SQL Server 에이전트 작업이 정의된 임계값보다 오래 실행되었을 때 야기됩니다. 작업에 문제가 있을 수 있습니다.

SQL Server 에이전트는 특정 시간이나 간격으로 발생하도록 예약된 SQL Server 태스크를 실행할 뿐 아니라 관리자가 호출기나 전자 메일을 통한 경고와 같은 동작을 정의한 특정 상태 또는 이러한 상태를 해결할 태스크를 검색합니다. SQL Server 에이전트는 관리자가 정의한 복제 태스크 실행에도 사용됩니다.

경고 또는 오류 상태를 야기시킨 작업을 식별하려면 상태 변경 또는 경고에 대한 컨텍스트 데이터를 확인합니다.

해결 방법

SQL Server Management Studio를 확인하여 실행 중인 작업을 식별합니다. 이러한 작업이 필요한 것보다 더 오래 실행되면 그 원인을 파악하십시오.

sp_help_jobactivity를 사용하여 현재 실행 중인 작업에 대한 정보를 확인합니다.

또는 일부 에이전트 작업이 장기 실행될 것으로 예상되면 다음을 수행합니다.

Element properties:

TargetMicrosoft.SQLServer.2012.Agent
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.AgentLongRunningJobsProvider
RemotableTrue
AccessibilityPublic
Alert Message
장기 실행 작업
컴퓨터 {0}에 있는 SQL 인스턴스 {1}에 장기 실행 에이전트 작업이 있습니다. 이것은 하나 이상의 작업에 문제가 있음을 나타낼 수 있습니다.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Agent.LongRunningJobs" Accessibility="Public" Enabled="false" Target="SQL2012Core!Microsoft.SQLServer.2012.Agent" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.AgentLongRunningJobsProvider" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.Agent.LongRunningJobs.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold1" MonitorTypeStateID="UnderThreshold1" HealthState="Success"/>
<OperationalState ID="OverThreshold1UnderThreshold2" MonitorTypeStateID="OverThreshold1UnderThreshold2" HealthState="Warning"/>
<OperationalState ID="OverThreshold2" MonitorTypeStateID="OverThreshold2" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>600</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<Threshold1>60</Threshold1>
<Threshold2>120</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>