RunAs | Microsoft.SQLServer.Core.RunAs.Monitoring |
Accessibility | Internal |
Support Monitor Recalculate | False |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.SQLServer.Linux.DataSource.BlockingSessions | Default |
FilterBad | ConditionDetection | System.ExpressionFilter | Default |
FilterGood | ConditionDetection | System.ExpressionFilter | Default |
ID | ParameterType | Selector | Display Name | Description |
---|---|---|---|---|
IntervalSeconds | int | $Config/IntervalSeconds$ | Interval (seconds) | The recurring interval of time in seconds in which to run the workflow. |
SyncTime | string | $Config/SyncTime$ | Synchronization Time | The synchronization time specified by using a 24-hour format. May be omitted. |
WaitMinutes | int | $Config/WaitMinutes$ | Wait Time (minutes) | The minimum process execution duration before considering it for Blocked SPIDs analysis. |
NumberBlockedSPIDs | int | $Config/NumberBlockedSPIDs$ | Number of blocked sessions | The maximum allowed number of blocked sessions. |
TimeoutSeconds | int | $Config/TimeoutSeconds$ | Timeout (seconds) | Specifies the time the workflow is allowed to run before being closed and marked as failed. |
SqlExecTimeoutSeconds | int | $Config/SqlExecTimeoutSeconds$ | Timeout for query execution (seconds) | The workflow will fail and register an event, if the query execution takes longer than the specified period. |
SqlTimeoutSeconds | int | $Config/SqlTimeoutSeconds$ | Timeout for database connection (seconds) | The workflow will fail and register an event, if it cannot access the database during the specified period. |
<UnitMonitorType ID="Microsoft.SQLServer.Linux.MonitorType.DBEngine.BlockingSessions" Accessibility="Internal" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<MonitorTypeStates>
<MonitorTypeState ID="Blocked"/>
<MonitorTypeState ID="NotBlocked"/>
</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="NetbiosComputerName" 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="ConnectionString" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceVersion" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceEdition" 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="WaitMinutes" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NumberBlockedSPIDs" type="xsd:int"/>
<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="SqlExecTimeoutSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlTimeoutSeconds" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
<OverrideableParameter ID="SyncTime" ParameterType="string" Selector="$Config/SyncTime$"/>
<OverrideableParameter ID="WaitMinutes" ParameterType="int" Selector="$Config/WaitMinutes$"/>
<OverrideableParameter ID="NumberBlockedSPIDs" ParameterType="int" Selector="$Config/NumberBlockedSPIDs$"/>
<OverrideableParameter ID="TimeoutSeconds" ParameterType="int" Selector="$Config/TimeoutSeconds$"/>
<OverrideableParameter ID="SqlExecTimeoutSeconds" ParameterType="int" Selector="$Config/SqlExecTimeoutSeconds$"/>
<OverrideableParameter ID="SqlTimeoutSeconds" ParameterType="int" Selector="$Config/SqlTimeoutSeconds$"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource TypeID="Microsoft.SQLServer.Linux.DataSource.BlockingSessions" ID="DS">
<MachineName>$Config/MachineName$</MachineName>
<NetbiosComputerName>$Config/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Config/InstanceName$</InstanceName>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
<InstanceVersion>$Config/InstanceVersion$</InstanceVersion>
<InstanceEdition>$Config/InstanceEdition$</InstanceEdition>
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
<WaitMinutes>$Config/WaitMinutes$</WaitMinutes>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<SqlExecTimeoutSeconds>$Config/SqlExecTimeoutSeconds$</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>$Config/SqlTimeoutSeconds$</SqlTimeoutSeconds>
</DataSource>
<ConditionDetection ID="FilterGood" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='BlockedSPIDCount']</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">$Config/NumberBlockedSPIDs$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="FilterBad" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='BlockedSPIDCount']</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Integer">$Config/NumberBlockedSPIDs$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Blocked">
<Node ID="FilterGood">
<Node ID="DS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="NotBlocked">
<Node ID="FilterBad">
<Node ID="DS"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>