Percent of Expired Subscriptions

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

Percent of Expired Subscriptions Monitor

Knowledge Base article:

Summary

Measures the percent of expired subscriptions.

The monitor does not support merge replication.

Causes

A subscription expires if it has not synchronized within the specified retention period.

For transactional replication, if a subscription is not synchronized within the publication retention period, the subscription will expire, and will be dropped by the expired subscription clean up job that runs on the Publisher.

Resolutions

For transactional replication, the subscription must be recreated and synchronized. If a push subscription expires, it is completely removed, however, pull subscriptions are not. Pull subscriptions must be cleaned up on the Subscriber.

The retention period may have to be adjusted to allow for increased duration between Subscriber synchronizations. Be aware that by increasing this value, it will cause the amount of replication data to grow and has the potential to negatively impact replication performance.

External

Further information for subscription expiration management can be found at the following location:

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

Overrideable Parameters

Name

Description

Default Value

Alert Priority

Defines Alert Priority.

Normal

Alert Severity

Defines Alert Severity.

Error

Enabled

Enables or disables the workflow.

Yes

Error Threshold

Error Threshold

10

Generates Alerts

Defines whether the workflow generates an Alert.

Yes

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

300

Synchronization Time

Synchronization Time

 

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

300

Timeout for database connection (seconds)

The workflow will fail and register an event, if it cannot access the database during the specified period.

15

Warning Threshold

Warning Threshold

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 Replication: A high percentage of expired subscriptions has been detected on the Distributor.
The Distributor (Name: '{0}', Server: '{1}') has detected a high percentage of expired subscriptions.
Percent of expired subscriptions: {2}\%
Subscriptions:
{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>15</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/>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>