sys.elastic_pool_resource_stats (Azure SQL Database)sys.elastic_pool_resource_stats (Azure SQL Database)

適用範圍:Applies to: 是Azure SQL DatabaseAzure SQL DatabaseYesAzure SQL DatabaseAzure SQL Database 是Azure SQL 受控執行個體Azure SQL Managed InstanceYesAzure SQL 受控執行個體Azure SQL Managed Instance適用範圍:Applies to: 是Azure SQL DatabaseAzure SQL DatabaseYesAzure SQL DatabaseAzure SQL Database 是Azure SQL 受控執行個體Azure SQL Managed InstanceYesAzure SQL 受控執行個體Azure SQL Managed Instance

傳回 SQL Database 伺服器中的所有彈性集區的資源使用量統計資料。Returns resource usage statistics for all the elastic pools in a SQL Database server. 每個彈性集區,每 15 秒報告時間範圍會傳回一列 (每分鐘四列)。For each elastic pool, there is one row for each 15 second reporting window (four rows per minute). 包括集區中所有資料庫的 CPU、IO、記錄、儲存體使用情況和並行的要求/工作階段使用量。This includes CPU, IO, Log, storage consumption and concurrent request/session utilization by all databases in the pool. 這項資料會保留14天。This data is retained for 14 days.

適用于: SQL DatabaseSQL Database V12。Applies to: SQL DatabaseSQL Database V12.
資料行名稱Column name 資料類型Data type 描述Description
start_timestart_time datetime2datetime2 指出15秒報告間隔開始的 UTC 時間。UTC time indicating the start of the 15 second reporting interval.
end_timeend_time datetime2datetime2 指出15秒報告間隔結束的 UTC 時間。UTC time indicating the end of the 15 second reporting interval.
elastic_pool_nameelastic_pool_name nvarchar(128)nvarchar(128) 彈性資料庫集區的名稱。Name of the elastic database pool.
avg_cpu_percentavg_cpu_percent **decimal (5,2) **decimal(5,2) 集區限制的平均計算使用量百分比。Average compute utilization in percentage of the limit of the pool.
avg_data_io_percentavg_data_io_percent **decimal (5,2) **decimal(5,2) 集區限制的平均 I/O 使用量百分比。Average I/O utilization in percentage based on the limit of the pool.
avg_log_write_percentavg_log_write_percent **decimal (5,2) **decimal(5,2) 集區限制的平均寫入資源使用量百分比。Average write resource utilization in percentage of the limit of the pool.
avg_storage_percentavg_storage_percent **decimal (5,2) **decimal(5,2) 集區儲存體限制的平均儲存體使用量百分比。Average storage utilization in percentage of the storage limit of the pool.
max_worker_percentmax_worker_percent **decimal (5,2) **decimal(5,2) 集區限制的並行背景工作角色 (要求) 百分比。Maximum concurrent workers (requests) in percentage based on the limit of the pool.
max_session_percentmax_session_percent **decimal (5,2) **decimal(5,2) 集區限制的並行工作階段百分比。Maximum concurrent sessions in percentage based on the limit of the pool.
elastic_pool_dtu_limitelastic_pool_dtu_limit intint 間隔期間此彈性集區目前最大的彈性集區 DTU 設定。Current max elastic pool DTU setting for this elastic pool during this interval.
elastic_pool_storage_limit_mbelastic_pool_storage_limit_mb bigintbigint 間隔期間此彈性集區目前最大的彈性集區儲存體限制設定 (MB)。Current max elastic pool storage limit setting for this elastic pool in megabytes during this interval.
avg_allocated_storage_percentavg_allocated_storage_percent **decimal (5,2) **decimal(5,2) 彈性集區中所有資料庫所配置的資料空間百分比。The percentage of data space allocated by all databases in the elastic pool. 這是配置給彈性集區資料大小上限的資料空間的比率。This is the ratio of data space allocated to data max size for the elastic pool. 如需詳細資訊,請參閱SQL Database 中的檔案空間管理For more information see: File space management in SQL Database

備註Remarks

此視圖存在於 SQL Database server 的 master 資料庫中。This view exists in the master database of the SQL Database server. 您必須連接至 master 資料庫,才能查詢 sys.elastic_pool_resource_statsYou must be connected to the master database to query sys.elastic_pool_resource_stats.

權限Permissions

需要 dbmanager 角色中的成員資格。Requires membership in the dbmanager role.

範例Examples

下列範例會傳回目前 SQL Database 伺服器中所有彈性資料庫集區最近一次排序的資源使用量資料。The following example returns resource utilization data ordered by the most recent time for all the elastic database pools in the current SQL Database server.

SELECT * FROM sys.elastic_pool_resource_stats
ORDER BY end_time DESC;  

下列範例會計算指定集區的平均 DTU 百分比耗用量。The following example calculates the average DTU percentage consumption for a given pool.

SELECT start_time, end_time,
  (SELECT Max(v)
FROM (VALUES (avg_cpu_percent), (avg_data_io_percent), (avg_log_write_percent)) AS value(v)) AS [avg_DTU_percent]
FROM sys.elastic_pool_resource_stats
WHERE elastic_pool_name = '<your pool name>'
ORDER BY end_time DESC;  

另請參閱See Also

使用彈性資料庫來駕馭爆炸性成長 Tame explosive growth with elastic databases
建立及管理 SQL Database 彈性資料庫集區 Create and manage a SQL Database elastic database pool
sys.resource_stats (Azure SQL Database) sys.resource_stats (Azure SQL Database)
sys.dm_db_resource_stats (Azure SQL Database)sys.dm_db_resource_stats (Azure SQL Database)