MSSQL 2016: 資料庫已配置空間 (MB)

Microsoft.SQLServer.2016.Database.DBSize.Collection (Rule)

收集資料庫已配置大小

Knowledge Base article:

摘要

為這個資料庫的所有檔案群組中的所有檔案所配置的空間數量 (MB)。

Please note that this rule collects metrics for ROWS data only. Metrics for FILESTREAM and for In-Memory OLTP data are ignored.

可覆寫的參數

名稱

描述

預設值

Azure 檔案大小上限 (MB)

Azure BLOB 儲存體中所儲存的資料檔案大小上限。此工作流程會考慮將此值用做為每個檔案的儲存體容量上限。

1048576

已啟用

啟用或停用該工作流程。

間隔 (秒)

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

900

同步處理時間

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

 

逾時 (秒)

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

300

Element properties:

TargetMicrosoft.SQLServer.2016.Database
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2016.DBSizeRawPerfProvider Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2016.Database.DBSize.Collection" Target="SQL2016Core!Microsoft.SQLServer.2016.Database" Enabled="true">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2016.DBSizeRawPerfProvider">
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
<ServerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</SqlInstanceName>
<ObjectName>SQL Database</ObjectName>
<CounterName>DB Allocated Space (MB)</CounterName>
<InstanceName/>
<DatabaseName>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</DatabaseName>
<Value>$Data/Property[@Name='DBSizeMB']$</Value>
<TimeoutSeconds>300</TimeoutSeconds>
<AzureMaxFileSizeMB>1048576</AzureMaxFileSizeMB>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>