MSSQL 2012 Replication: Database Connection Monitor Type

Microsoft.SQLServer.2012.Replication.MonitorType.DBConnectionMonitor (UnitMonitorType)

The Database Connection Monitor Type

Element properties:

RunAsDefault
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
Trigger DataSource Microsoft.SQLServer.2012.Replication.DataSource.DbAvailabilityMonitor Default
IsError ConditionDetection System.ExpressionFilter Default
IsSuccessful 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.
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.2012.Replication.MonitorType.DBConnectionMonitor" Accessibility="Internal">
<MonitorTypeStates>
<MonitorTypeState ID="Error"/>
<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="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"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="SqlTimeout" ParameterType="int" Selector="$Config/SqlTimeout$"/>
<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.2012.Replication.DataSource.DbAvailabilityMonitor">
<SqlTimeout>$Config/SqlTimeout$</SqlTimeout>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</DataSource>
<ConditionDetection ID="IsSuccessful" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Success</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="IsError" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Error</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Error">
<Node ID="IsError">
<Node ID="Trigger"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Health">
<Node ID="IsSuccessful">
<Node ID="Trigger"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>