차단 세션

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

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

Knowledge Base article:

요약

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

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

원인

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

해결 방법

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

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

Element properties:

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

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.DBEngine.BlockedSPIDsMonitor" Accessibility="Public" Enabled="false" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.DBEngine.BlockedSPIDs" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.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>