MSSQL unter Windows: Windows-Serverdienst

Microsoft.SQLServer.Windows.MonitorType.LocalDBEngine.ServiceStatus (UnitMonitorType)

Der Monitortyp zum Erkennen des Zustands des SQL Server-Windows-Diensts unter Windows.

Element properties:

RunAsMicrosoft.SQLServer.Core.RunAs.Monitoring
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.Windows.DataSource.ServiceStatus Default
ServiceNotRunning ConditionDetection System.ExpressionFilter Default
ServiceRunning ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Intervall (Sekunden)Gibt das Wiederholungsintervall in Sekunden für die Ausführung des Workflows an.
SyncTimestring$Config/SyncTime$SynchronisierungszeitDie Synchronisierungszeit, angegeben im 24-Stunden-Format. Dieser Wert kann ausgelassen werden.
CheckStartupTypebool$Config/CheckStartupType$Nur warnen, wenn der Starttyp des Diensts automatisch erfolgtDieser Parameter kann nur auf "true" (wahr) oder "false" (falsch) festgelegt werden. Wenn dieser Parameter auf "false" festgelegt ist, bleibt die aktuelle Starttypeinstellung des Diensts vom Workflow unberücksichtigt. Der Standardwert lautet "true".
UnavailableTimeint$Config/UnavailableTime$Zeitraum der Nichtverfügbarkeit (Sek.)Die Mindestdauer der Dienstunterbrechung, nach der der Dienst als fehlerhaft gilt.

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.Windows.MonitorType.LocalDBEngine.ServiceStatus" Accessibility="Internal" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<MonitorTypeStates>
<MonitorTypeState ID="Running" NoDetection="false"/>
<MonitorTypeState ID="NotRunning" NoDetection="false"/>
</MonitorTypeStates>
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:integer"/>
<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="PrincipalName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ServiceName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CheckStartupType" type="xsd:boolean"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UnavailableTime" type="xsd:integer"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string"/>
<OverrideableParameter ID="CheckStartupType" Selector="$Config/CheckStartupType$" ParameterType="bool"/>
<OverrideableParameter ID="UnavailableTime" Selector="$Config/UnavailableTime$" ParameterType="int"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource TypeID="Microsoft.SQLServer.Windows.DataSource.ServiceStatus" ID="DS">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
<PrincipalName>$Config/PrincipalName$</PrincipalName>
<ServiceName>$Config/ServiceName$</ServiceName>
<CheckStartupType>$Config/CheckStartupType$</CheckStartupType>
<UnavailableTime>$Config/UnavailableTime$</UnavailableTime>
</DataSource>
<ConditionDetection ID="ServiceRunning" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ServiceState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Running</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="ServiceNotRunning" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ServiceState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">NotRunning</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Running">
<Node ID="ServiceRunning">
<Node ID="DS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="NotRunning">
<Node ID="ServiceNotRunning">
<Node ID="DS"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>