Skip to content

Commit 3ca85d2

Browse files
20220809 add linkage
1 parent a6fbeac commit 3ca85d2

4 files changed

Lines changed: 27 additions & 15 deletions

File tree

‎azure-sql/database/elastic-pool-manage.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.topic: conceptual
99
author: arvindshmicrosoft
1010
ms.author: arvindsh
1111
ms.reviewer: wiassaf, mathoma
12-
ms.date: 03/12/2019
12+
ms.date: 08/09/2022
1313
ms.custom:
1414
- "seoapril2019 sqldbrb=1"
1515
- "devx-track-azurecli"
@@ -84,14 +84,15 @@ To create and move databases within existing elastic pools or to return informat
8484

8585
> [!IMPORTANT]
8686
> You cannot create, update, or delete an Azure SQL Database elastic pool using Transact-SQL. You can add or remove databases from an elastic pool, and you can use DMVs to return information about existing elastic pools.
87-
>
87+
8888

8989
| Command | Description |
9090
| --- | --- |
9191
|[CREATE DATABASE (Azure SQL Database)](/sql/t-sql/statements/create-database-azure-sql-database)|Creates a new database in an existing pool or as a single database. You must be connected to the master database to create a new database.|
9292
| [ALTER DATABASE (Azure SQL Database)](/sql/t-sql/statements/alter-database-azure-sql-database) |Move a database into, out of, or between elastic pools.|
9393
|[DROP DATABASE (Transact-SQL)](/sql/t-sql/statements/drop-database-transact-sql)|Deletes a database.|
9494
|[sys.elastic_pool_resource_stats (Azure SQL Database)](/sql/relational-databases/system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database)|Returns resource usage statistics for all the elastic pools on a server. For each elastic pool, there is one row for each 15 second reporting window (four rows per minute). This includes CPU, IO, Log, storage consumption and concurrent request/session utilization by all databases in the pool.|
95+
|[sys.dm_elastic_pool_resource_stats (Azure SQL Database)](/sql/relational-databases/system-catalog-views/sys-dm-elastic-pool-resource-stats-azure-sql-database)|Returns resource usage statistics for the current database in an elastic pool. There is one row for each 20 second reporting window (three rows per minute). This includes CPU, IO, Log, storage consumption and concurrent request/session utilization by the current database in the pool.|
9596
|[sys.database_service_objectives (Azure SQL Database)](/sql/relational-databases/system-catalog-views/sys-database-service-objectives-azure-sql-database)|Returns the edition (service tier), service objective (pricing tier), and elastic pool name, if any, for a database in SQL Database or Azure Synapse Analytics. If logged on to the master database in a server, returns information on all databases. For Azure Synapse Analytics, you must be connected to the master database.|
9697

9798
## REST API

‎azure-sql/database/resource-limits-logical-server.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Azure SQL Database requires compute resources to implement core service features
139139

140140
Total CPU and memory consumption by user workloads and internal processes is reported in the [sys.dm_db_resource_stats](/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database) and [sys.resource_stats](/sql/relational-databases/system-catalog-views/sys-resource-stats-azure-sql-database) views, in `avg_instance_cpu_percent` and `avg_instance_memory_percent` columns. This data is also reported via the `sqlserver_process_core_percent` and `sqlserver_process_memory_percent` Azure Monitor metrics, for [single databases](/azure/azure-monitor/essentials/metrics-supported#microsoftsqlserversdatabases) and [elastic pools](/azure/azure-monitor/essentials/metrics-supported#microsoftsqlserverselasticpools) at the pool level.
141141

142-
CPU and memory consumption by user workloads in each database is reported in the [sys.dm_db_resource_stats](/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database) and [sys.resource_stats](/sql/relational-databases/system-catalog-views/sys-resource-stats-azure-sql-database) views, in `avg_cpu_percent` and `avg_memory_usage_percent` columns. For elastic pools, pool-level resource consumption is reported in the [sys.elastic_pool_resource_stats](/sql/relational-databases/system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database) view. User workload CPU consumption is also reported via the `cpu_percent` Azure Monitor metric, for [single databases](/azure/azure-monitor/essentials/metrics-supported#microsoftsqlserversdatabases) and [elastic pools](/azure/azure-monitor/essentials/metrics-supported#microsoftsqlserverselasticpools) at the pool level.
142+
CPU and memory consumption by user workloads in each database is reported in the [sys.dm_db_resource_stats](/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database) and [sys.resource_stats](/sql/relational-databases/system-catalog-views/sys-resource-stats-azure-sql-database) views, in `avg_cpu_percent` and `avg_memory_usage_percent` columns. For elastic pools, pool-level resource consumption is reported in the [sys.elastic_pool_resource_stats](/sql/relational-databases/system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database) view. Database-level consumption of elastic pool resources is reported in [sys.dm_elastic_pool_resource_stats](/sql/relational-databases/system-catalog-views/sys-dm-elastic-pool-resource-stats-azure-sql-database). User workload CPU consumption is also reported via the `cpu_percent` Azure Monitor metric, for [single databases](/azure/azure-monitor/essentials/metrics-supported#microsoftsqlserversdatabases) and [elastic pools](/azure/azure-monitor/essentials/metrics-supported#microsoftsqlserverselasticpools) at the pool level.
143143

144144
A more detailed breakdown of recent resource consumption by user workloads and internal processes is reported in the [sys.dm_resource_governor_resource_pools_history_ex](/sql/relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-history-ex-azure-sql-database) and [sys.dm_resource_governor_workload_groups_history_ex](/sql/relational-databases/system-dynamic-management-views/sys-dm-resource-governor-workload-groups-history-ex-azure-sql-database) views. For details on resource pools and workload groups referenced in these views, see [Resource governance](#resource-governance). These views report on resource utilization by user workloads and specific internal processes in the associated resource pools and workload groups.
145145

@@ -169,7 +169,7 @@ The IOPS and throughput max values returned by the [sys.dm_user_db_resource_gove
169169

170170
For Basic, Standard, and General Purpose databases, which use data files in Azure Storage, the `primary_group_max_io` value may not be achievable if a database doesn't have enough data files to cumulatively provide this number of IOPS, or if data isn't distributed evenly across files, or if the performance tier of underlying blobs limits IOPS/throughput below the resource governance limits. Similarly, with small log IOs generated by frequent transaction commits, the `primary_max_log_rate` value may not be achievable by a workload due to the IOPS limit on the underlying Azure Storage blob. For databases using Azure Premium Storage, Azure SQL Database uses sufficiently large storage blobs to obtain needed IOPS/throughput, regardless of database size. For larger databases, multiple data files are created to increase total IOPS/throughput capacity.
171171

172-
Resource utilization values such as `avg_data_io_percent` and `avg_log_write_percent`, reported in the [sys.dm_db_resource_stats](/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database), [sys.resource_stats](/sql/relational-databases/system-catalog-views/sys-resource-stats-azure-sql-database), and [sys.elastic_pool_resource_stats](/sql/relational-databases/system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database) views, are calculated as percentages of maximum resource governance limits. Therefore, when factors other than resource governance limit IOPS/throughput, it's possible to see IOPS/throughput flattening out and latencies increasing as the workload increases, even though reported resource utilization remains below 100%.
172+
Resource utilization values such as `avg_data_io_percent` and `avg_log_write_percent`, reported in the [sys.dm_db_resource_stats](/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database), [sys.resource_stats](/sql/relational-databases/system-catalog-views/sys-resource-stats-azure-sql-database), [sys.dm_elastic_pool_resource_stats](/sql/relational-databases/system-catalog-views/sys-dm-elastic-pool-resource-stats-azure-sql-database), and [sys.elastic_pool_resource_stats](/sql/relational-databases/system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database) views, are calculated as percentages of maximum resource governance limits. Therefore, when factors other than resource governance limit IOPS/throughput, it's possible to see IOPS/throughput flattening out and latencies increasing as the workload increases, even though reported resource utilization remains below 100%.
173173

174174
To determine read and write IOPS, throughput, and latency per database file, use the [sys.dm_io_virtual_file_stats()](/sql/relational-databases/system-dynamic-management-views/sys-dm-io-virtual-file-stats-transact-sql) function. This function surfaces all I/O against the database, including background I/O that isn't accounted towards `avg_data_io_percent`, but uses IOPS and throughput of the underlying storage, and can impact observed storage latency. The function reports additional latency that may be introduced by I/O resource governance for reads and writes, in the `io_stall_queued_read_ms` and `io_stall_queued_write_ms` columns respectively.
175175

‎docs/relational-databases/system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure SQL Database
44
description: sys.elastic_pool_resource_stats (Azure SQL Database)
55
author: rwestMSFT
66
ms.author: randolphwest
7-
ms.date: "03/30/2022"
7+
ms.date: 08/09/2022
88
ms.service: sql-database
99
ms.prod_service: "sql-database"
1010
ms.topic: "reference"
@@ -18,7 +18,6 @@ helpviewer_keywords:
1818
- "elastic_pool_resource_stats"
1919
dev_langs:
2020
- "TSQL"
21-
ms.assetid: f242c1bd-3cc8-4c8b-8aaf-c79b6a8a0329
2221
monikerRange: "=azuresqldb-current"
2322
---
2423
# sys.elastic_pool_resource_stats (Azure SQL Database)
@@ -39,11 +38,16 @@ Returns resource usage statistics for all the [elastic pools](/azure/azure-sql/d
3938
|**max_session_percent**|**decimal(5,2)**|Maximum concurrent sessions in percentage based on the limit of the pool.|
4039
|**elastic_pool_dtu_limit**|**int**|Current max elastic pool DTU setting for this elastic pool during this interval.|
4140
|**elastic_pool_storage_limit_mb**|**bigint**|Current max elastic pool storage limit setting for this elastic pool in megabytes during this interval.|
41+
|**max_xtp_storage_percent**|**decimal(5,2)**| |
42+
|**avg_login_rate_percent**|**decimal(5,2)**| |
43+
|**avg_instance_cpu_percent**|**decimal(5,2)**| |
44+
|**avg_instance_memory_percent**|**decimal(5,2)**| |
45+
|**elastic_pool_cpu_limit**|**decimal(5,2)**| |
4246
|**avg_allocated_storage_percent**|**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. For more information see: [File space management in SQL Database](/azure/sql-database/sql-database-file-space-management)|
4347

4448
## Remarks
4549

46-
This view exists in the master database of the [logical server](/azure/azure-sql/database/logical-servers). You must be connected to the master database to query **sys.elastic_pool_resource_stats**.
50+
This view exists in the `master` database of the [logical server](/azure/azure-sql/database/logical-servers). You must be connected to the `master` database to query `sys.elastic_pool_resource_stats`.
4751

4852
## Permissions
4953

‎docs/relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-history-ex-azure-sql-database.md‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "sys.dm_resource_governor_resource_pools_history_ex (Transact-SQL)"
3-
description: sys.dm_resource_governor_resource_pools_history_ex (Transact-SQL)
3+
description: "Each row in sys.dm_resource_governor_resource_pools_history_ex represents a periodic snapshot of resource pool statistics in Azure SQL Database."
44
author: MikeRayMSFT
55
ms.author: mikeray
6-
ms.date: "01/05/2021"
6+
ms.date: 08/09/2022
77
ms.prod: sql
88
ms.prod_service: sql-database
99
ms.technology: system-objects
@@ -104,28 +104,35 @@ Users can access this dynamic management view to monitor near real time resour
104104
105105
## Examples
106106

107-
The following example returns  maximum log rate data and consumption at each snapshot by user pool
107+
The following example returns maximum log rate data and consumption at each snapshot by user pool:
108108

109109
```sql
110-
select snapshot_time, name, max_log_rate_kb, delta_log_bytes_used from sys.dm_resource_governor_resource_pools_history_ex where name like 'UserPool%' order by snapshot_time desc
110+
SELECT snapshot_time, name, max_log_rate_kb, delta_log_bytes_used
111+
FROM sys.dm_resource_governor_resource_pools_history_ex
112+
WHERE name LIKE 'UserPool%'
113+
ORDER BY snapshot_time DESC;
111114
```
112115

113-
The following example returns similar info as sys.elastic_pool_resource_stats without having to connect to Logical Master
116+
The following example returns similar info as `sys.elastic_pool_resource_stats` without having to connect to Azure SQL logical server's `master` database:
114117

115118
```sql
116-
select snapshot_time, name, cap_vcores_used_percent,
119+
SELECT snapshot_time, name, cap_vcores_used_percent,
117120
avg_data_io_percent,
118121
avg_log_write_percent,
119122
avg_storage_percent,
120123
avg_allocated_storage_percent,
121124
max_data_space_kb,
122125
max_worker_percent,
123126
max_session_percent
124-
from sys.dm_resource_governor_resource_pools_history_ex where name like 'UserPool%' order by snapshot_time desc
127+
FROM sys.dm_resource_governor_resource_pools_history_ex
128+
WHERE name LIKE 'UserPool%'
129+
ORDER BY snapshot_time DESC;
125130
```
126131

127-
## See Also
132+
## Next steps
128133

129134
- [Translation log rate governance](/azure/sql-database/sql-database-resource-limits-database-server#transaction-log-rate-governance)
130135
- [Elastic pool DTU resource limits](/azure/sql-database/sql-database-dtu-resource-limits-elastic-pools)
131136
- [Elastic pool vCore resource limits](/azure/sql-database/sql-database-vcore-resource-limits-elastic-pools)
137+
- [sys.database_usage (Azure SQL Database)](../system-catalog-views/sys-database-usage-azure-sql-database.md)
138+
- [sys.elastic_pool_resource_stats (Azure SQL Database)](../system-catalog-views/sys-elastic-pool-resource-stats-azure-sql-database.md)

0 commit comments

Comments
 (0)