MSSQL 2014: AlwaysOn 검색 스크립트 실패 규칙

Microsoft.SQLServer.2014.AlwaysOn.ScriptFailedRule (Rule)

이 규칙은 이벤트 ID 4202을 검색하고 알림을 만듭니다.

Knowledge Base article:

요약

AlwaysOn 스크립트 실패 이벤트 검색 규칙

원인

계속으로 처리되지 않는 cmdlet 호출의 예외뿐만 아니라 스크립트 내의 예외로 인해 스크립트 실행이 실패할 수 있습니다.

해결 방법

경고 설명 및 컨텍스트에 실패한 규칙이나 모니터를 나타내는 정보가 있습니다.

재정의 가능한 매개 변수

이름

설명

기본값

사용

 

알림 생성

 

우선 순위

 

1

심각도

 

2

Element properties:

TargetMicrosoft.SQLServer.2014.AlwaysOn.AlwaysOnSeed
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
MSSQL 2014: AlwaysOn 검색 스크립트 실패
AlwaysOn 검색 스크립트가 실패했습니다. 이유: {0}
Event LogOperations Manager

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
Alert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.2014.AlwaysOn.ScriptFailedRule" Enabled="true" Target="Microsoft.SQLServer.2014.AlwaysOn.AlwaysOnSeed" ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<LogName>Operations Manager</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4202</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventLevel</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">2</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertOwner/>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2014.AlwaysOn.ScriptFailedRule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>