MSSQL 2016 Replication: Subscription Pending Commands Monitor Type

Microsoft.SQLServer.2016.Replication.MonitorType.SubscriptionPendingCmds (UnitMonitorType)

The Microsoft SQL Server 2016 Subscription Pending Commands Monitor Type

Element properties:

RunAsDefault
AccessibilityPublic
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
Trigger DataSource Microsoft.SQLServer.2016.Replication.DataSource.SubscriptionPendingCmdsMonitor Default
IsHealth ConditionDetection System.ExpressionFilter Default
IsWarning ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
SqlTimeoutint$Config/SqlTimeout$Timeout for database connection (seconds)The workflow will fail and register an event, if it cannot access the database during the specified period.
Thresholdint$Config/Threshold$ThresholdThreshold
NumSamplesint$Config/NumSamples$Number of samplesIndicates how many times a measured value should breach a threshold before the state is changed.
IntervalSecondsint$Config/IntervalSeconds$Interval (seconds)The recurring interval of time in seconds in which to run the workflow.
SyncTimestring$Config/SyncTime$Synchronization TimeSynchronization Time
TimeoutSecondsint$Config/TimeoutSeconds$Timeout (seconds)Specifies the time the workflow is allowed to run before being closed and marked as failed.

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.2016.Replication.MonitorType.SubscriptionPendingCmds" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="Warning"/>
<MonitorTypeState ID="Health"/>
</MonitorTypeStates>
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlTimeout" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ConnectionString" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SubscriptionType" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PublisherName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Subscriber" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PublisherDb" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SubscriberDb" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Publication" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Threshold" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NumSamples" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SyncTime" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:integer" minOccurs="0" maxOccurs="1"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="SqlTimeout" ParameterType="int" Selector="$Config/SqlTimeout$"/>
<OverrideableParameter ID="Threshold" Selector="$Config/Threshold$" ParameterType="int"/>
<OverrideableParameter ID="NumSamples" Selector="$Config/NumSamples$" ParameterType="int"/>
<OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
<OverrideableParameter ID="SyncTime" ParameterType="string" Selector="$Config/SyncTime$"/>
<OverrideableParameter ID="TimeoutSeconds" ParameterType="int" Selector="$Config/TimeoutSeconds$"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="Trigger" TypeID="Microsoft.SQLServer.2016.Replication.DataSource.SubscriptionPendingCmdsMonitor">
<SqlTimeout>$Config/SqlTimeout$</SqlTimeout>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
<SubscriptionType>$Config/SubscriptionType$</SubscriptionType>
<PublisherName>$Config/PublisherName$</PublisherName>
<Subscriber>$Config/Subscriber$</Subscriber>
<PublisherDb>$Config/PublisherDb$</PublisherDb>
<SubscriberDb>$Config/SubscriberDb$</SubscriberDb>
<Publication>$Config/Publication$</Publication>
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</DataSource>
<ConditionDetection ID="IsWarning" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='SubscriptionPendingCmds']</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">$Config/Threshold$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='SubscriptionPendingCmds']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
<SuppressionSettings>
<MatchCount>$Config/NumSamples$</MatchCount>
<SampleCount>$Config/NumSamples$</SampleCount>
</SuppressionSettings>
</ConditionDetection>
<ConditionDetection ID="IsHealth" TypeID="System!System.ExpressionFilter">
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='SubscriptionPendingCmds']</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Integer">$Config/Threshold$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='SubscriptionPendingCmds']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Warning">
<Node ID="IsWarning">
<Node ID="Trigger"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Health">
<Node ID="IsHealth">
<Node ID="Trigger"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>