장기 실행 작업

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

이 모니터는 장기 실행 SQL 에이전트 작업을 확인합니다.
SQL Server 에이전트 Windows 서비스는 모든 버전의 SQL Server Express에서 지원되지 않습니다. 적절한 검색된 개체가 없습니다. 이 모니터는 기본적으로 사용하지 않도록 설정되어 있습니다. 필요한 경우 사용하도록 설정하려면 재정의를 사용하세요.

Knowledge Base article:

요약

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

원인

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

SQL Server 에이전트는 특정 시간 또는 간격마다 발생하도록 예약된 SQL Server 태스크를 실행하고 관리자가 호출 또는 전자 메일을 통한 알림과 같은 작업이나 해당 상태를 해결할 태스크를 정의한 특정 상태를 검색합니다. SQL Server 에이전트는 관리자가 정의한 복제 태스크 실행에도 사용됩니다.

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

해결 방법

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

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

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

재정의 가능한 매개 변수

이름

설명

기본값

알림 우선 순위

알림 우선 순위를 정의합니다.

보통

알림 심각도

알림 심각도를 정의합니다.

MatchMonitorHealth

위험 임계값(분)

값이 이 임계값을 초과하는 경우 모니터의 상태가 위험으로 변경됩니다. 이 임계값과 경고 임계값 사이(경계 포함)에서는 모니터가 경고 상태로 유지됩니다.

120

사용

워크플로를 사용하거나 사용하지 않도록 설정합니다.

아니요

알림 생성

워크플로가 알림을 생성하는지를 정의합니다.

간격(초)

워크플로를 실행하는 반복 시간 간격(초)입니다.

600

동기화 시간

24시간 형식으로 지정된 동기화 시간입니다. 생략될 수 있습니다.

 

제한 시간(초)

워크플로를 닫고 실패로 표시하기 전에 워크플로를 실행할 수 있는 시간을 지정합니다.

300

경고 임계값(분)

경고 임계값입니다. 이 임계값을 초과하면 모니터가 경고 상태로 변경됩니다.

60

Element properties:

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

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.Agent.LongRunningJobs" Accessibility="Public" Enabled="false" Target="SQL2016Core!Microsoft.SQLServer.2016.Agent" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2016.AgentLongRunningJobsProvider" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.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="SQL2016Core!Microsoft.SQLServer.2016.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="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
<Threshold1>60</Threshold1>
<Threshold2>120</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>