MSSQL on Windows 复制: 分发服务器的失败作业监视器类型

Microsoft.SQLServer.Replication.Windows.MonitorType.DistributorFailJobs (UnitMonitorType)

分发服务器的失败作业监视器类型

Element properties:

RunAsDefault
AccessibilityPublic
Support Monitor RecalculateFalse

Member Modules:

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

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
SqlTimeoutSecondsint$Config/SqlTimeoutSeconds$数据库连接超时(秒)如果在指定期间无法访问数据库,工作流将失败并注册一个事件。
ThresholdCountOfFailsForJobint$Config/ThresholdCountOfFailsForJob$每作业阈值每作业阈值
ThresholdCountOfFailedJobsint$Config/ThresholdCountOfFailedJobs$已失败作业计数阈值已失败作业计数阈值
IntervalSecondsint$Config/IntervalSeconds$间隔(秒)运行工作流的重复间隔时间(秒)。
SyncTimestring$Config/SyncTime$同步时间同步时间
TimeoutSecondsint$Config/TimeoutSeconds$超时(秒)指定允许工作流在被关闭并标记为失败之前运行的时间。

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.Replication.Windows.MonitorType.DistributorFailJobs" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="Warning"/>
<MonitorTypeState ID="Health"/>
</MonitorTypeStates>
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MachineName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlTimeoutSeconds" 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="MonitoringType" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ThresholdCountOfFailsForJob" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ThresholdCountOfFailedJobs" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CategoryList" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ExcludeCategoryList" type="xsd:string"/>
<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="SqlTimeoutSeconds" ParameterType="int" Selector="$Config/SqlTimeoutSeconds$"/>
<OverrideableParameter ID="ThresholdCountOfFailsForJob" Selector="$Config/ThresholdCountOfFailsForJob$" ParameterType="int"/>
<OverrideableParameter ID="ThresholdCountOfFailedJobs" Selector="$Config/ThresholdCountOfFailedJobs$" 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.Replication.Windows.DataSource.DistributorFailJobsMonitor">
<MachineName>$Config/MachineName$</MachineName>
<InstanceName>$Config/InstanceName$</InstanceName>
<SqlTimeoutSeconds>$Config/SqlTimeoutSeconds$</SqlTimeoutSeconds>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
<MonitoringType>$Config/MonitoringType$</MonitoringType>
<NumberOfConsecutiveFails>$Config/ThresholdCountOfFailsForJob$</NumberOfConsecutiveFails>
<CategoryList>$Config/CategoryList$</CategoryList>
<ExcludeCategoryList>$Config/ExcludeCategoryList$</ExcludeCategoryList>
<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='DistributorFailJobs']</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">$Config/ThresholdCountOfFailedJobs$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='DistributorFailJobs']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="IsHealth" TypeID="System!System.ExpressionFilter">
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='DistributorFailJobs']</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Integer">$Config/ThresholdCountOfFailedJobs$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='DistributorFailJobs']</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>