MSSQL в Windows: изменение процента базы данных

Microsoft.SQLServer.Windows.MonitorType.Database.DBPercentageChange (UnitMonitorType)

Этот тип монитора проверяет наличие изменений в свободном месте базы данных между последовательными интервалами опроса.

Element properties:

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

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.Windows.DataSource.DBSizeRawPerfProvider Default
CDDeltaThreshold ConditionDetection System.Performance.DeltaValueCondition Default
CDOverThreshold1UnderThreshold2 ConditionDetection System.ExpressionFilter Default
CDOverThreshold2 ConditionDetection System.ExpressionFilter Default
CDUnderThreshold1 ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Интервал (в секундах)Повторяющийся интервал времени в секундах, в который следует запустить рабочий процесс.
SyncTimestring$Config/SyncTime$Время синхронизацииВремя синхронизации указывается в 24-часовом формате и может быть опущено.
NumSamplesint$Config/NumSamples$Число выборокПоказывает, сколько раз измеряемое значение должно пересечь пороговое значение для того, чтобы состояние изменилось.
Threshold1double$Config/Threshold1$Порог "Предупреждение"Пороговое значение предупреждения. Превышение этого порогового значения приведет к переключению монитора по крайней мере в состояние предупреждения.
Threshold2double$Config/Threshold2$Критическое пороговое значениеМонитор изменит свое состояние на критическое, если значение превысит указанное пороговое значение. Если значение находится между этим пороговым значением и пороговым значением предупреждения (включительно), то монитор будет находиться в состоянии предупреждения.
TimeoutSecondsint$Config/TimeoutSeconds$Время ожидания (в секундах)Указывает время, в течение которого может выполняться рабочий процесс, прежде чем он будет закрыт или завершится сбоем.
AzureMaxFileSizeMBint$Config/AzureMaxFileSizeMB$Максимальный размер файла Azure (МБ)Максимальный размер файла данных в хранилище BLOB-объектов Azure. Рабочий процесс будет рассматривать это значение как максимальный объем хранения каждого файла.
SqlExecTimeoutSecondsint$Config/SqlExecTimeoutSeconds$
SqlTimeoutSecondsint$Config/SqlTimeoutSeconds$

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.Windows.MonitorType.Database.DBPercentageChange" Accessibility="Internal" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<MonitorTypeStates>
<MonitorTypeState ID="UnderThreshold1"/>
<MonitorTypeState ID="OverThreshold1UnderThreshold2"/>
<MonitorTypeState ID="OverThreshold2"/>
</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="DatabaseName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AzureMaxFileSizeMB" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ObjectName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CounterName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PerfInstanceName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ValuePropertyName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Threshold1" type="xsd:double"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Threshold2" type="xsd:double"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NumSamples" 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="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="MonitoringType" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlExecTimeoutSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlTimeoutSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:integer"/>
<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"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
<OverrideableParameter ID="SyncTime" ParameterType="string" Selector="$Config/SyncTime$"/>
<OverrideableParameter ID="NumSamples" ParameterType="int" Selector="$Config/NumSamples$"/>
<OverrideableParameter ID="Threshold1" ParameterType="double" Selector="$Config/Threshold1$"/>
<OverrideableParameter ID="Threshold2" ParameterType="double" Selector="$Config/Threshold2$"/>
<OverrideableParameter ID="TimeoutSeconds" ParameterType="int" Selector="$Config/TimeoutSeconds$"/>
<OverrideableParameter ID="AzureMaxFileSizeMB" ParameterType="int" Selector="$Config/AzureMaxFileSizeMB$"/>
<OverrideableParameter ID="SqlExecTimeoutSeconds" ParameterType="int" Selector="$Config/SqlExecTimeoutSeconds$"/>
<OverrideableParameter ID="SqlTimeoutSeconds" ParameterType="int" Selector="$Config/SqlTimeoutSeconds$"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource TypeID="Microsoft.SQLServer.Windows.DataSource.DBSizeRawPerfProvider" ID="DS">
<MachineName>$Config/MachineName$</MachineName>
<NetbiosComputerName>$Config/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Config/InstanceName$</InstanceName>
<DatabaseName>$Config/DatabaseName$</DatabaseName>
<AzureMaxFileSizeMB>$Config/AzureMaxFileSizeMB$</AzureMaxFileSizeMB>
<ObjectName>$Config/ObjectName$</ObjectName>
<CounterName>$Config/CounterName$</CounterName>
<PerfInstanceName>$Config/PerfInstanceName$</PerfInstanceName>
<ValuePropertyName>$Config/ValuePropertyName$</ValuePropertyName>
<ConnectionString>$Config/ConnectionString$</ConnectionString>
<InstanceVersion>$Config/InstanceVersion$</InstanceVersion>
<InstanceEdition>$Config/InstanceEdition$</InstanceEdition>
<MonitoringType>$Config/MonitoringType$</MonitoringType>
<SqlExecTimeoutSeconds>$Config/SqlExecTimeoutSeconds$</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>$Config/SqlTimeoutSeconds$</SqlTimeoutSeconds>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
</DataSource>
<ConditionDetection TypeID="SystemPerf!System.Performance.DeltaValueCondition" ID="CDDeltaThreshold">
<NumSamples>$Config/NumSamples$</NumSamples>
<Absolute>true</Absolute>
</ConditionDetection>
<ConditionDetection ID="CDUnderThreshold1" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>Greater</Operator>
<ValueExpression>
<Value Type="Double">-$Config/Threshold1$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="CDOverThreshold1UnderThreshold2" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>LessEqual</Operator>
<ValueExpression>
<Value Type="Double">-$Config/Threshold1$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Double">-$Config/Threshold2$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="CDOverThreshold2" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Double">-$Config/Threshold2$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="UnderThreshold1">
<Node ID="CDUnderThreshold1">
<Node ID="CDDeltaThreshold">
<Node ID="DS"/>
</Node>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="OverThreshold1UnderThreshold2">
<Node ID="CDOverThreshold1UnderThreshold2">
<Node ID="CDDeltaThreshold">
<Node ID="DS"/>
</Node>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="OverThreshold2">
<Node ID="CDOverThreshold2">
<Node ID="CDDeltaThreshold">
<Node ID="DS"/>
</Node>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>