[弃用]数据库可用空间(MB)

Microsoft.SQLServer.2008.Database.DBSizeMegabytesMonitor (UnitMonitor)

不推荐使用此监视器。监视数据库的剩余可用空间(以 MB 表示)。

Knowledge Base article:

摘要

此监视器检查数据库绝对可用空间(以 MB 为单位)以确保它高于定义的阈值。如果它低于其中一个定义的阈值,将生成一个警告或错误警报。

无论报告的可用空间是多少,具有自动增长集的数据库永远不会生成警报。

在初始状态下,此监视器将从不高于阈值,只要两个阈值均设置为 -1。使用可用空间百分比进行监视是默认行为。如果要求监视绝对可用空间使用率,则应替代此监视器的阈值

原因

不正常状态是由数据库运行可用空间不足引起的。这可能是由于快速增长或一段时间内缓慢发展引起的。使用以下链接来查看此数据库的历史数据:

数据库性能数据

解决方法

可以通过以下任一方法解决此问题:

或者,如果无需考虑数据库的数据库大小:

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

生成警报

定义工作流是否生成警报。

间隔(秒)

要运行工作流的重复时间间隔(秒)。

900

阈值下限

此监视器的阈值下限。

-1

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

 

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

300

阈值上限

此监视器的阈值上限。

-1

Element properties:

TargetMicrosoft.SQLServer.2008.Database
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.DBAndLogSizeMonitorType
RemotableTrue
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.Database.DBSizeMegabytesMonitor" Accessibility="Public" Enabled="false" Target="SQL2008Core!Microsoft.SQLServer.2008.Database" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.DBAndLogSizeMonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<OperationalStates>
<OperationalState ID="UnderThreshold1" MonitorTypeStateID="UnderThreshold1" HealthState="Error"/>
<OperationalState ID="OverThreshold1UnderThreshold2" MonitorTypeStateID="OverThreshold1UnderThreshold2" HealthState="Warning"/>
<OperationalState ID="OverThreshold2" MonitorTypeStateID="OverThreshold2" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<ServerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</SqlInstanceName>
<ObjectName>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:Database</ObjectName>
<CounterName>DB Free Space (MB)</CounterName>
<InstanceName>$Data/Property[@Name='Database']$</InstanceName>
<DatabaseName>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</DatabaseName>
<Value>$Data/Property[@Name='DBSizeMB']$</Value>
<Threshold1>-1</Threshold1>
<Threshold2>-1</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>