All Subscriptions are Synchronizing for Publication

Microsoft.SQLServer.2017.Replication.Windows.Monitor.PublicationSubscriptionSyncStatusMonitor (UnitMonitor)

All Subscriptions are Synchronizing

Knowledge Base article:

Summary

This monitor makes a connection to the distributor and checks state of subscriptions associated with specific publication. If any subscriptions are not synchronizing, it turns into a warning.

Causes

Distribution or Merge agent is disabled.

Replication agent is failing.

Resolutions

Enable Distribution or Merge agent if it is marked as disabled.

Check the agents’ job history and the SQL Server Replication monitor and resolve any issues where errors were logged.

Overrideable Parameters

Name

Description

Default Value

Alert Priority

Defines Alert Priority.

Normal

Alert Severity

Defines Alert Severity.

Warning

Enabled

Enables or disables the workflow.

Yes

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.

200

Timeout for database connection (seconds)

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

15

Element properties:

TargetMicrosoft.SQLServer.2017.Replication.Windows.Publication
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2017.Replication.Windows.MonitorType.PublicationSubscriptionSyncStatus
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2017 on Windows Replication: Publication {0} on the Publisher {1} has subscriptions that are out of sync.
{2}
RunAsMicrosoft.SQLServer.MonitoringAccount

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2017.Replication.Windows.Monitor.PublicationSubscriptionSyncStatusMonitor" Accessibility="Public" Enabled="true" Target="SQL2017ReplWD!Microsoft.SQLServer.2017.Replication.Windows.Publication" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2017.Replication.Windows.MonitorType.PublicationSubscriptionSyncStatus" ConfirmDelivery="false" RunAs="GPMP!Microsoft.SQLServer.MonitoringAccount">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2017.Replication.Windows.Monitor.PublicationSubscriptionSyncStatusMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type='MSRL!Microsoft.SQLServer.2017.Replication.Library.GenericPublication']/PublicationName$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Property[Type='SQL2017L!Microsoft.SQLServer.2017.Library.DBEngine']/ConnectionString$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='Message']$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Health" MonitorTypeStateID="Health" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Host/Property[Type='SQL2017L!Microsoft.SQLServer.2017.Library.DBEngine']/MachineName$</MachineName>
<InstanceName>$Target/Host/Host/Property[Type='SQL2017L!Microsoft.SQLServer.2017.Library.DBEngine']/InstanceName$</InstanceName>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<ConnectionString>$Target/Host/Property[Type='MSRL!Microsoft.SQLServer.2017.Replication.Library.GenericPublisher']/Distributor$</ConnectionString>
<MonitoringType>$Target/Host/Host/Property[Type="SQL2017WD!Microsoft.SQLServer.2017.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<PublisherName>$Target/Host/Host/Property[Type='SQL2017L!Microsoft.SQLServer.2017.Library.DBEngine']/ConnectionString$</PublisherName>
<Publication>$Target/Property[Type='MSRL!Microsoft.SQLServer.2017.Replication.Library.GenericPublication']/PublicationName$</Publication>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
<CheckMachineAndInstanceName>false</CheckMachineAndInstanceName>
</Configuration>
</UnitMonitor>