期限切れサブスクリプションの割合

Microsoft.SQLServer.2012.Replication.Monitor.PercentOfExpiredSubscriptions (UnitMonitor)

期限切れのサブスクリプション モニターの割合

Knowledge Base article:

概要

期限切れとなったサブスクリプションのパーセンテージを測定します。

原因

サブスクリプションは、指定された保持期間内で同期されていない場合、期限切れになります。

トランザクション レプリケーションでは、サブスクライバーがパブリケーション保持期間内に同期されない場合、サブスクリプションが期限切れになり、パブリッシャーで実行される有効期限が切れたサブスクリプションのクリーンアップ ジョブによって、削除されます。

マージ レプリケーションでは、sp_addmergepublication の @retention および @retention_period_unit パラメーターを使用して、保持期間を定義します。サブスクリプションが期限切れになるのは、サブスクリプションが保持期間内に正常に同期されなかった場合とサブスクライバーのパーティションにデータの変更があった場合に限ります。

解決策

トランザクション レプリケーションでは、サブスクリプションを再作成し、再同期化する必要があります。プッシュ サブスクリプションが期限切れになった場合、それは完全に削除されますが、プル サブスクリプションは削除されません。プル サブスクリプションはサブスクライバー上でクリーンアップする必要があります。

マージ サブスクリプションが期限切れになると、サブスクリプションのメタデータが削除されます。サブスクリプションは、最後に成功した同期から、保持期間の 2 倍まで、再初期化できます。保持期間の 2 倍の値が過ぎると、それは完全に削除されるため、再作成して、同期する必要があります。プッシュ サブスクリプションでは、有効期限が切れたサブスクリプションのクリーンアップ ジョブによってサブスクリプションが自動的に削除されます。プル サブスクリプションはクリーンアップされないため、サブスクライバー上でクリーンアップする必要があります。

サブスクライバーの同期の間隔の増加を考慮するように、保持期間を調整する必要がある可能性があります。この値を増やすことによって、レプリケーション データ量が増加し、レプリケーション パフォーマンスに影響する可能性があることに注意してください。

外部

サブスクリプションの有効期限管理の詳細については、次の場所を参照してください:

http://technet.microsoft.com/library/ms151188.aspx

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

名前

説明

既定値

有効化

ワークフローの有効化または無効化

はい

エラーのしきい値

エラーのしきい値

10

警告を生成する

ワークフローが警告を生成するかどうかを規定する

はい

間隔 (秒)

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

300

タイムアウト (秒)

タイムアウト (秒)

300

同期時間

同期時間

 

警告のしきい値

警告のしきい値

0

Element properties:

TargetMicrosoft.SQLServer.2012.Replication.Distributor
Parent MonitorSystem.Health.ConfigurationState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.Replication.MonitorType.DistributorPercentOfDeactivatedSubscriptions
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL2012 レプリケーション:ディストリビューターで、期限切れのサブスクリプションが高い割合で検出されました。
ディストリビューター (名前:'{0}'、サーバー: '{1}') は期限切れのサブスクリプションの割合が高いことを検出しました。
期限切れのサブスクリプションの割合:{2}\%
サブスクリプション:
{3}
RunAsMicrosoft.SQLServer.Replication.Monitoring.RunAs.Monitor

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Replication.Monitor.PercentOfExpiredSubscriptions" Accessibility="Public" Enabled="true" Target="MS2RD!Microsoft.SQLServer.2012.Replication.Distributor" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.Replication.MonitorType.DistributorPercentOfDeactivatedSubscriptions" ConfirmDelivery="false" RunAs="MSRL!Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.Replication.Monitor.DistributorPercentOfExpiredSubscriptions.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericDistributor']/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericDistributor']/ConnectionString$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='DistributorPercentOfDeactivatedSubscriptions']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='Message']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Health" MonitorTypeStateID="Health" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<SqlTimeout>300</SqlTimeout>
<ConnectionString>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericDistributor']/ConnectionString$</ConnectionString>
<MeasuredStateId>0</MeasuredStateId>
<WarningThreshold>0</WarningThreshold>
<ErrorThreshold>10</ErrorThreshold>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>