MSSQL 2016: Rolle des Datenbankreplikats geändert

Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplicaRoleChanged (Rule)

Dieser Fehler tritt auf, wenn das Datenbankreplikat die Rolle wechselt.

Knowledge Base article:

Zusammenfassung

Dieser Fehler tritt auf, wenn das Datenbankreplikat die Rolle wechselt.

Dieses Ereignis ist in SQL Server standardmäßig deaktiviert. Es kann durch folgende TSQL aktiviert werden: sp_altermessage 1480, 'with_log', 'true'.

Ursachen

Sehen Sie sich die Ursache in der Ereignisbeschreibung an.

Lösungen

Es ist keine Benutzeraktion erforderlich. Weitere Informationen finden Sie im SQL Server-Fehlerprotokoll, in der WSFC-Verwaltungskonsole (Windows Server Failover Clustering) oder im WSFC-Protokoll.

Parameter, die außer Kraft gesetzt werden können

Name

Beschreibung

Standardwert

Aktiviert

Aktiviert oder deaktiviert den Workflow.

Ja

Priorität

Definiert die Warnungspriorität.

1

Schweregrad

Definiert den Warnungsschweregrad.

1

Element properties:

TargetMicrosoft.SQLServer.2016.AlwaysOn.DatabaseReplica
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
MSSQL 2016: Rolle des Datenbankreplikats geändert
{0}
Event LogApplication

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplicaRoleChanged" Target="AlwaysOnDisc!Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplica" Enabled="true" ConfirmDelivery="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="AlwaysOnDisc!Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplica"]/PerformanceObjectName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<!--Default instance with SQLServer object name-->
<Value Type="String">MS$Target/Property[Type="AlwaysOnDisc!Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplica"]/PerformanceObjectName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1480</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="AlwaysOnDisc!Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplica"]/AvailabilityDatabaseName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2016.AlwaysOn.DatabaseReplicaRoleChanged.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>