DB FILESTREAM 檔案群組可用空間

Microsoft.SQLServer.2016.Monitoring.DBFileStreamGroupSpaceMonitor (UnitMonitor)

可用空間低於 [警告臨界值] 設定 (以資料大小總和的百分比表示) 時,此監視器會回報警告。可用空間低於 [重大臨界值] 時,此監視器會回報重大警示。

Knowledge Base article:

摘要

FILESTREAM 檔案群組容器的可用磁碟空間低於 [警告臨界值] (以磁碟可用空間總計的百分比表示) 時,此監視器會回報警告。可用空間低於 [重大臨界值] 時,此監視器會回報重大警示。

因為會將更多資料加入資料表,所以 [FILESTREAM 檔案群組資料容器] 資料夾一般來說會隨著時間變大。因此,管理員會想要監視此參數,確保容器資料夾的儲存體位置中有足夠的剩餘空間。

原因

當 FILESTREAM 資料容器設定所在之磁碟機的可用磁碟空間太低時,可能會發生一些失敗,造成無法成功處理資料、使用者查詢延遲,或影響其他共用相同磁碟空間配置的應用程式。

解決方法

可用磁碟空間不足的解決方法取決於根本原因,必須從此問題發生的每種情況調查。下列幾種方法,可能可以緩解此狀況:

可覆寫的參數

名稱

描述

預設值

警示優先程式

定義警示優先順序。

一般

警示嚴重性

定義警示嚴重性。

錯誤

Azure 檔案大小上限 (MB)

Azure 檔案大小上限 (MB)

1048576

重大臨界值

如果值低於此臨界值,此監視器會將其狀態變更為 [重大]。在此臨界值與警告臨界值 (含) 之間的值,會讓監視器處於警告狀態。

10

已啟用

啟用或停用該工作流程。

產生警示

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

間隔 (秒)

執行工作流程的週期性時間間隔 (秒)。

900

同步處理時間

使用 24 小時制指定的同步處理時間。將會忽略。

 

逾時 (秒)

指定允許工作流程在關閉且標示為失敗之前執行的時間。

300

警告臨界值

如果值低於此臨界值,此監視器會將其狀態變更為 [警告]。

20

Element properties:

TargetMicrosoft.SQLServer.2016.DBFileGroupFd
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2016.DBFileStreamGroupSizeMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2016: DB FILESTREAM 檔案群組資料容器的空間即將用盡
電腦 "{3}" 上 SQL 執行個體 "{2}" 中資料庫 "{1}" 內檔案群組 "{0}" 的 DB FILESTREAM 檔案群組資料容器即將用盡空間。如需詳細資料,請參閱<知識>一節。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.Monitoring.DBFileStreamGroupSpaceMonitor" Accessibility="Public" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.DBFileGroupFd" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2016.DBFileStreamGroupSizeMonitorType" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.Monitoring.DBFileStreamFileGroupSpaceMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.FileGroup"]/GroupName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</AlertParameter3>
<AlertParameter4>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<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/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
<ServerName>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</SqlInstanceName>
<ObjectName>SQL DB FileStream FileGroup</ObjectName>
<CounterName>DB FileStrem FileGroup Free Space (%)</CounterName>
<InstanceName/>
<DatabaseName>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</DatabaseName>
<DBFileId>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBFileGroupFd"]/GroupID$</DBFileId>
<Value>$Data/Property[@Name='FreeSpacePercent']$</Value>
<Threshold1>10</Threshold1>
<Threshold2>20</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
<AzureMaxFileSizeMB>1048576</AzureMaxFileSizeMB>
</Configuration>
</UnitMonitor>