資料庫檔案空間 (積存)

Microsoft.SQLServer.2008.DBFileGroup.DBFileSpaceMonitorRollUp (DependencyMonitor)

監視檔案群組中的可用空間。

Knowledge Base article:

摘要

監視檔案群組及裝載此檔案群組之媒體的可用空間。只有為其中一個檔案啟用自動成長之後,裝載此檔案的媒體上之可用空間,才會納入可用空間。

原因

這個檔案群組的可用空間不足,導致健全狀況不佳的狀態。造成可用空間不足的可能原因為:

請使用以下連結來檢視效能資料: DB 檔案群組可用空間效能資料

無自動成長

若是沒有自動成長的檔案,可用空間將會是檔案初始大小與已使用空間兩者之間的差值。

啟用自動成長

啟用自動成長時,可用磁碟空間會納入可用空間。除了檔案大小與已使用空間兩者間之間的差值之外,啟用自動成長的檔案,其可用空間將會是大小上限與檔案大小之間差值以及磁碟上剩餘的可用空間這兩者中較小的一值。

具有自動成長的資料庫檔案可用空間不足,可能表示檔案已接近主控邏輯磁碟機的限制。對於啟用自動成長且有大小上限的檔案而言,可用空間不足也可能表示檔案已接近為檔案所指定的大小上限。

可用空間的計算也會考量以下情況: 如果檔案成長的幅度大於磁碟上剩餘的可用空間時,以及大小上限與目前檔案大小之間的差距小於成長幅度時,檔案也可能無法成長。在上述情況下,因為已經無法再繼續成長了,所以磁碟上剩餘的可用空間將不會納入可用空間。

解決方式

您可以使用以下任一方法來解決此問題:

請參閱《SQL Server 線上叢書》: 檔案與檔案群組架構

可覆寫的參數

名稱

描述

預設值

警示優先程式

定義警示優先順序。

一般

警示嚴重性

定義警示嚴重性。

MatchMonitorHealth

已啟用

啟用或停用該工作流程。

產生警示

定義工作流程是否會產生警示。

Element properties:

TargetMicrosoft.SQLServer.2008.DBFileGroup
Parent MonitorMicrosoft.SQLServer.2008.Database.DBFileGroupSpaceMonitor
AlgorithmBestOf
Source MonitorMicrosoft.SQLServer.2008.Monitoring.DBFileSpaceMonitor
RelationshipMicrosoft.SQLServer.2008.DBFileGroupHostsDBFile
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
RemotableTrue
AccessibilityPublic
Alert Message
檔案群組空間即將用盡
電腦 "{3}" 上 SQL 執行個體 "{2}" 中資料庫 "{1}" 的檔案群組 «{0}» 空間即將用盡。如需詳細資料,請參閱<知識>一節。

Source Code:

<DependencyMonitor ID="Microsoft.SQLServer.2008.DBFileGroup.DBFileSpaceMonitorRollUp" Accessibility="Public" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.DBFileGroup" ParentMonitorID="Microsoft.SQLServer.2008.Database.DBFileGroupSpaceMonitor" Remotable="true" Priority="Normal" RelationshipType="SQL2008Core!Microsoft.SQLServer.2008.DBFileGroupHostsDBFile" MemberMonitor="Microsoft.SQLServer.2008.Monitoring.DBFileSpaceMonitor">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.DBFileGroup.DBFileSpaceMonitorRollUp.AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL!Microsoft.SQLServer.DBFileGroup"]/GroupName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter3>
<AlertParameter4>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<Algorithm>BestOf</Algorithm>
<MemberUnAvailable>Error</MemberUnAvailable>
</DependencyMonitor>