MSSQL on Windows レプリケーション: ディストリビューター アラート ルールについて、保守ジョブが失敗しました

Microsoft.SQLServer.Replication.Windows.DistributorFailedMaintenanceJobsAlertRule (Rule)

ディストリビューターアラート ルールについて、保守ジョブが失敗しました

Knowledge Base article:

概要

レプリケーションは、次のジョブを使用してスケジュールされたおよびオンデマンドの保守を実行します。

ジョブのクリーンアップ

説明

既定のスケジュール

エージェント履歴のクリーンアップ: ディストリビューション

ディストリビューション データベースからレプリケーション エージェントの履歴を削除します。

10 分ごとに実行する

ディストリビューション クリーンアップ: ディストリビューション

ディストリビューション データベースからレプリケートされたトランザクションを削除します。最大ディストリビューション保持期間内に同期されていないサブスクリプションを非アクティブ化します。

10 分ごとに実行する

期限切れサブスクリプションのクリーンアップ

期限切れサブスクリプションを検出してパブリケーション データベースから除去します。

毎日 1:00 A.M. に実行します。

データ検証の失敗したサブスクリプションを再初期化する

データ検証エラーを含むすべてのサブスクリプションを検出して、再初期化のためにマークします。次にマージ エージェントまたはディストリビューション エージェントを実行すると、新しいスナップショットがサブスクライバーに適用されます。

既定のスケジュールはありません (既定では有効になりません)。

レプリケーション エージェントの検査

アクティブに履歴を記録していないレプリケーション エージェントを検出します。ジョブ ステップが失敗する場合は、Microsoft Windows イベント ログに書き込まれます。

10 分ごとに実行します。

ディストリビューションのためのレプリケーション モニタリング リフレッシャー

レプリケーション モニターで使用されたキャッシュに入れられているクエリを更新します。

継続して実行します。

原因

レプリケーション保守ジョブは、以下のような多くの原因により失敗する場合があります:

解決方法

問題を解決するには、以下をお試しください。

上書き可能なパラメーター

名前

説明

既定値

有効

ワークフローを有効または無効にします。

はい

間隔 (秒)

ワークフローを実行する定期的な実行間隔 (秒)。

300

優先度

アラートの優先度を定義します。

2

重大度

アラートの重要度を定義します。

2

同期時刻

同期時刻

 

タイムアウト (秒)

ワークフローが終了して失敗とマークされるまでの、ワークフローの許容実行時間を指定します。

200

データベース接続のタイムアウト (秒)

指定された期間中にデータベースにアクセスできない場合、ワークフローは失敗し、イベントが登録されます。

15

Element properties:

TargetMicrosoft.SQLServer.Replication.Windows.Distributor
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityHigh
RemotableTrue
Alert Message
MSSQL on Windows レプリケーション: ディストリビューターで、一部のレプリケーション保守ジョブが失敗しました。
{0}

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.Replication.Windows.DataSource.DistributorFailJobsMonitor Microsoft.SQLServer.Core.RunAs.Monitoring
CDMaintenanceJobsCountNotNull ConditionDetection System.ExpressionFilter Default
Alert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.Replication.Windows.DistributorFailedMaintenanceJobsAlertRule" ConfirmDelivery="true" DiscardLevel="100" Enabled="true" Priority="Normal" Remotable="true" Target="SQLReplWD!Microsoft.SQLServer.Replication.Windows.Distributor">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.Replication.Windows.DataSource.DistributorFailJobsMonitor" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<MachineName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/MachineName$</MachineName>
<InstanceName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/InstanceName$</InstanceName>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<ConnectionString>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/ConnectionString$</ConnectionString>
<MonitoringType>$Target/Host/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<NumberOfConsecutiveFails>1</NumberOfConsecutiveFails>
<CategoryList/>
<ExcludeCategoryList>Distribution, LogReader, Merge, QueueReader, Snapshot</ExcludeCategoryList>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
</DataSource>
</DataSources>
<ConditionDetection ID="CDMaintenanceJobsCountNotNull" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='DistributorFailJobs']</XPathQuery>
</ValueExpression>
<Operator>Greater</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
<Priority>2</Priority>
<Severity>2</Severity>
<AlertName/>
<AlertDescription/>
<AlertOwner/>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.Replication.Windows.DistributorFailedMaintenanceJobsAlertRule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/Property[@Name="Message"]$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
<Custom1/>
<Custom2/>
<Custom3/>
<Custom4/>
<Custom5/>
<Custom6/>
<Custom7/>
<Custom8/>
<Custom9/>
<Custom10/>
</WriteAction>
</WriteActions>
</Rule>