MSSQL 2016: tipo de monitor de directiva de dos estados

Microsoft.SQLServer.2016.TwoStatePolicyMonitorType (UnitMonitorType)

Tipo de monitor de dos estados utilizado para supervisar las directivas de usuario personalizado.

Element properties:

RunAsDefault
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
DSa DataSource Microsoft.SQLServer.2016.DBPolicyStateProvider Default
ErrorFilter ConditionDetection System.ExpressionFilter Default
HealthFilter ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Intervalo (segundos)Intervalo de tiempo periódico en segundos en que se ejecuta el flujo de trabajo.
TimeoutSecondsint$Config/TimeoutSeconds$Tiempo de espera (segundos)Especifica el tiempo durante el que se puede ejecutar el flujo de trabajo antes de que se cierre y se marque como error.

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.2016.TwoStatePolicyMonitorType" Accessibility="Internal">
<MonitorTypeStates>
<MonitorTypeState ID="HealthState"/>
<MonitorTypeState ID="ErrorState"/>
</MonitorTypeStates>
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="ConnectionString" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="PolicyName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="IntervalSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="SyncTime" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="TimeoutSeconds" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource TypeID="Microsoft.SQLServer.2016.DBPolicyStateProvider" ID="DSa">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</DataSource>
<ConditionDetection ID="HealthFilter" TypeID="System!System.ExpressionFilter">
<Expression>
<Or>
<Expression>
<Not>
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name="$Config/PolicyName$"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
</Not>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name="$Config/PolicyName$"]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</ConditionDetection>
<ConditionDetection ID="ErrorFilter" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name="$Config/PolicyName$"]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">false</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="HealthState">
<Node ID="HealthFilter">
<Node ID="DSa"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="ErrorState">
<Node ID="ErrorFilter">
<Node ID="DSa"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>