MSSQL 2012: 镜像已撰写脚本的双态单元监视器类型

Microsoft.SQLServer.2012.Mirroring.ScriptedTwoStateType (UnitMonitorType)

用于确定 Microsoft SQL Server 2012 镜像对象状态的单元监视器类型。

Element properties:

RunAsDefault
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2012.Mirroring.ScriptedStateProviderTwoLevelHostTcp Default
FilterBad ConditionDetection System.ExpressionFilter Default
FilterGood ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$间隔(秒)要运行工作流的重复时间间隔(秒)。
SyncTimestring$Config/SyncTime$同步时间使用 24 小时格式指定的同步时间。可以忽略。
TimeoutSecondsint$Config/TimeoutSeconds$超时(秒)指定允许工作流在被关闭并标记为失败之前运行的时间。

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.2012.Mirroring.ScriptedTwoStateType" Accessibility="Internal">
<MonitorTypeStates>
<MonitorTypeState ID="Good"/>
<MonitorTypeState ID="Bad"/>
</MonitorTypeStates>
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ScriptName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ScriptBody" 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:int"/>
<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="GoodExpression" type="ExpressionType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BadExpression" type="ExpressionType"/>
</Configuration>
<OverrideableParameters>
<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="DS" TypeID="Microsoft.SQLServer.2012.Mirroring.ScriptedStateProviderTwoLevelHostTcp">
<ScriptName>$Config/ScriptName$</ScriptName>
<ScriptBody><Script>$Config/ScriptBody$</Script></ScriptBody>
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
</DataSource>
<ConditionDetection ID="FilterGood" TypeID="System!System.ExpressionFilter">
<Expression>$Config/GoodExpression$</Expression>
</ConditionDetection>
<ConditionDetection ID="FilterBad" TypeID="System!System.ExpressionFilter">
<Expression>$Config/BadExpression$</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Good">
<Node ID="FilterGood">
<Node ID="DS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Bad">
<Node ID="FilterBad">
<Node ID="DS"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>