MSSQL 2016 Replication: Count of the Failed Replication Jobs for the Subscriber

Microsoft.SQLServer.2016.Replication.CollectionRule.Subscriber.SubscriberFailJobsPerformanceCounter (Rule)

Count of the Failed Replication Jobs for the Subscriber

Knowledge Base article:

Summary

Count of the Failed Replication Jobs for the Subscriber

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

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

Element properties:

TargetMicrosoft.SQLServer.2016.Replication.Subscriber
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2016.Replication.DataSource.DistributorFailJobsMonitor Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor
Mapper ConditionDetection System.Performance.DataGenericMapper Default
WriteToDatabase WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2016.Replication.CollectionRule.Subscriber.SubscriberFailJobsPerformanceCounter" Enabled="true" Target="MS2RD!Microsoft.SQLServer.2016.Replication.Subscriber" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2016.Replication.DataSource.DistributorFailJobsMonitor" RunAs="MSRL!Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor">
<SqlTimeout>15</SqlTimeout>
<ConnectionString>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericSubscriber']/ConnectionString$</ConnectionString>
<NumberOfConsecutiveFails>1</NumberOfConsecutiveFails>
<CategoryList>Distribution, Merge</CategoryList>
<ExcludeCategoryList/>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</DataSources>
<ConditionDetection ID="Mapper" TypeID="Perf!System.Performance.DataGenericMapper">
<ObjectName>$Target/Property[Type="MSRL!Microsoft.SQLServer.Replication.Library.GenericSubscriber"]/InstanceName$</ObjectName>
<CounterName>Subscriber: Count of Failed Jobs</CounterName>
<InstanceName/>
<Value>$Data/Property[@Name='DistributorFailJobs']$</Value>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WriteToDatabase" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>