You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3ca85d2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: azure-sql/database/elastic-pool-manage.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.topic: conceptual
9
9
author: arvindshmicrosoft
10
10
ms.author: arvindsh
11
11
ms.reviewer: wiassaf, mathoma
12
-
ms.date: 03/12/2019
12
+
ms.date: 08/09/2022
13
13
ms.custom:
14
14
- "seoapril2019 sqldbrb=1"
15
15
- "devx-track-azurecli"
@@ -84,14 +84,15 @@ To create and move databases within existing elastic pools or to return informat
84
84
85
85
> [!IMPORTANT]
86
86
> 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
+
88
88
89
89
| Command | Description |
90
90
| --- | --- |
91
91
|[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.|
92
92
|[ALTER DATABASE (Azure SQL Database)](/sql/t-sql/statements/alter-database-azure-sql-database)|Move a database into, out of, or between elastic pools.|
93
93
|[DROP DATABASE (Transact-SQL)](/sql/t-sql/statements/drop-database-transact-sql)|Deletes a database.|
94
94
|[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.|
95
96
|[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.|
Copy file name to clipboardExpand all lines: azure-sql/database/resource-limits-logical-server.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ Azure SQL Database requires compute resources to implement core service features
139
139
140
140
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.
141
141
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.
143
143
144
144
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.
145
145
@@ -169,7 +169,7 @@ The IOPS and throughput max values returned by the [sys.dm_user_db_resource_gove
169
169
170
170
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.
171
171
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%.
173
173
174
174
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.
|**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)|
43
47
44
48
## Remarks
45
49
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`.
Copy file name to clipboardExpand all lines: docs/relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-history-ex-azure-sql-database.md
description: "Each row in sys.dm_resource_governor_resource_pools_history_ex represents a periodic snapshot of resource pool statistics in Azure SQL Database."
4
4
author: MikeRayMSFT
5
5
ms.author: mikeray
6
-
ms.date: "01/05/2021"
6
+
ms.date: 08/09/2022
7
7
ms.prod: sql
8
8
ms.prod_service: sql-database
9
9
ms.technology: system-objects
@@ -104,28 +104,35 @@ Users can access this dynamic management view to monitor near real time resour
104
104
105
105
## Examples
106
106
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:
108
108
109
109
```sql
110
-
select snapshot_time, name, max_log_rate_kb, delta_log_bytes_used fromsys.dm_resource_governor_resource_pools_history_exwhere name like'UserPool%'order by snapshot_time desc
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:
0 commit comments