차단 세션

Microsoft.SQLServer.2012.DBEngine.BlockedSPIDsMonitor (UnitMonitor)

SQL 인스턴스의 차단 세션을 모니터링합니다.

Knowledge Base article:

요약

차단 세션 모니터는 차단 상황이 존재하는지 검색합니다.

한 세션에서는 특정 리소스를 잠그고 다른 세션에서는 동일한 리소스에 대해 충돌하는 잠금 유형을 얻으려는 경우 차단이 발생합니다. 차단은 잠금 기반 동시성을 가진 모든 RDBMS(관계형 데이터베이스 관리 시스템)의 불가피한 특성이지만 너무 많은 차단으로 인해 성능 문제가 발생할 수 있습니다.

원인

시스템 성능에 상당한 영향을 줄 정도로 잠금 및 차단이 많아지는 이유는 일반적으로 다음 중 하나입니다.

해결 방법

또는 데이터베이스에서 차단 세션이 별로 중요하지 않을 경우 다음을 수행합니다.

참고 항목: “ INF: SQL Server 차단 문제 이해 및 해결

재정의 가능한 매개 변수

이름

설명

기본값

알림 우선 순위

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

높음

알림 심각도

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

오류

사용

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

아니요

알림 생성

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

간격(초)

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

300

차단 세션 수

차단 세션의 수입니다.

1

동기화 시간

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

 

제한 시간(초)

워크플로가 닫히고 실패한 항목으로 표시될 때까지 실행이 허용되는 시간을 지정합니다.

300

대기 시간(분)

차단 SPID 분석을 위해 고려하기 전 경과해야 하는 최소 프로세스 실행 기간입니다.

1

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityError
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.DBEngine.BlockedSPIDs
RemotableTrue
AccessibilityPublic
Alert Message
차단 세션
컴퓨터 "{2}"에 있는 SQL 인스턴스 "{1}"의 세션 {0}이(가) 차단되었습니다. 자세한 내용은 "경고 컨텍스트" 탭을 참조하십시오.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.DBEngine.BlockedSPIDsMonitor" Accessibility="Public" Enabled="false" Target="SQL2012Core!Microsoft.SQLServer.2012.DBEngine" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.DBEngine.BlockedSPIDs" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.DBEngine.BlockedSPIDsMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>High</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='BlockedSPIDList']$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Blocked" MonitorTypeStateID="Blocked" HealthState="Error"/>
<OperationalState ID="NotBlocked" MonitorTypeStateID="NotBlocked" HealthState="Success"/>
</OperationalStates>
<Configuration>
<ConnectionString>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<WaitMinutes>1</WaitMinutes>
<NumberBlockedSPIDs>1</NumberBlockedSPIDs>
<TimeoutSeconds>300</TimeoutSeconds>
<InstanceName>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</InstanceName>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
</Configuration>
</UnitMonitor>