Percent of Deactivated Subscriptions

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

Percent of Deactivated Subscriptions Monitor

Knowledge Base article:

Summary

Measures the percentage of expired subscriptions. The warning and critical thresholds are as follows: (defaults: warning > 0%, error > 10%)

The monitor does not support merge replication.

Causes

If a transactional replication subscription is not synchronized within the maximum distribution retention period (default of 72 hours), and there are changes in the Distribution database that have not been delivered to the Subscriber, the subscription will be marked as deactivated by the Distribution clean up job that runs on the Distributor.

Resolutions

The subscription must be reinitialized.

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

External

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

Subscription Expiration and Deactivation

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: High percentage of deactivated subscriptions detected on the Distributor.
The Distributor (Name: '{0}', Server: '{1}') has detected a high percentage of deactivated Subscriptions.
Percent of deactivated subscriptions: {2}\%
Subscriptions:
{3}
RunAsMicrosoft.SQLServer.Replication.Monitoring.RunAs.Monitor

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Replication.Monitor.PercentOfDeactivatedSubscriptions" 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.DistributorPercentOfDeactivatedSubscriptions.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>1</MeasuredStateId>
<WarningThreshold>0</WarningThreshold>
<ErrorThreshold>10</ErrorThreshold>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>