Skip to content

Commit c173c1c

Browse files
Update resource governor system views
1 parent c8df2e9 commit c173c1c

14 files changed

Lines changed: 463 additions & 444 deletions

docs/relational-databases/system-catalog-views/sys-resource-governor-configuration-transact-sql.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: "sys.resource_governor_configuration (Transact-SQL)"
33
description: sys.resource_governor_configuration (Transact-SQL)
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "03/14/2017"
6+
ms.reviewer: dfurman
7+
ms.date: 02/10/2025
78
ms.service: sql
89
ms.subservice: system-objects
910
ms.topic: "reference"
@@ -17,49 +18,48 @@ helpviewer_keywords:
1718
dev_langs:
1819
- "TSQL"
1920
---
21+
2022
# sys.resource_governor_configuration (Transact-SQL)
21-
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2223

23-
Returns the stored Resource Governor state.
24-
25-
|Column name|Data type|Description|
26-
|-----------------|---------------|-----------------|
27-
|classifier_function_id|**int**|The ID of the classifier function as it is stored in the metadata. Is not nullable.<br /><br /> **Note** This function is used to classify new sessions and uses rules to route the workload to the appropriate workload group. For more information, see [Resource Governor](../../relational-databases/resource-governor/resource-governor.md).|
28-
|is_enabled|**bit**|Indicates the current state of the Resource Governor:<br /><br /> 0 = Resource Governor is not enabled.<br /><br /> 1 = Resource Governor is enabled.<br /><br /> Is not nullable.|
29-
|max_outstanding_io_per_volume|**int**|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.<br /><br /> The maximum number of outstanding I/O per volume.|
30-
31-
## Remarks
32-
The catalog view displays the Resource Governor configuration as stored in metadata. To see the in-memory configuration use the corresponding dynamic management view.
33-
34-
## Permissions
35-
Requires VIEW ANY DEFINITION permission to view contents, requires CONTROL SERVER permission to change contents.
36-
37-
## Examples
38-
The following example shows how to get and compare the stored metadata values and the in-memory values of the Resource Governor configuration.
39-
40-
```
41-
USE master;
42-
GO
43-
-- Get the stored metadata.
44-
SELECT
45-
object_schema_name(classifier_function_id) AS 'Classifier UDF schema in metadata',
46-
object_name(classifier_function_id) AS 'Classifier UDF name in metadata'
47-
FROM
48-
sys.resource_governor_configuration;
49-
GO
50-
-- Get the in-memory configuration.
51-
SELECT
52-
object_schema_name(classifier_function_id) AS 'Active classifier UDF schema',
53-
object_name(classifier_function_id) AS 'Active classifier UDF name'
54-
FROM
55-
sys.dm_resource_governor_configuration;
56-
GO
57-
```
58-
59-
## See Also
60-
[Resource Governor Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/resource-governor-catalog-views-transact-sql.md)
61-
[Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/catalog-views-transact-sql.md)
62-
[sys.dm_resource_governor_configuration &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-configuration-transact-sql.md)
63-
[Resource Governor](../../relational-databases/resource-governor/resource-governor.md)
64-
65-
24+
[!INCLUDE [sql-asdbmi](../../includes/applies-to-version/sql-asdbmi.md)]
25+
26+
Returns the stored resource governor configuration.
27+
28+
| Column name | Data type | Description |
29+
|:--|:--|:--|
30+
| `classifier_function_id` | **int** | The object ID of the classifier function in [sys.objects](sys-objects-transact-sql.md). Is not nullable.<br /><br /> **Note** This function is used to classify new sessions and uses rules to route the workload to the appropriate workload group. For more information, see [Resource governor](../../relational-databases/resource-governor/resource-governor.md). |
31+
| `is_enabled` | **bit** | Indicates the current state of resource governor:<br /><br /> 0 = is not enabled.<br /><br /> 1 = is enabled.<br /><br /> Is not nullable. |
32+
| `max_outstanding_io_per_volume` | **int** | **Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.<br /><br /> The maximum number of outstanding I/O requests per volume. |
33+
34+
## Remarks
35+
36+
The catalog view displays resource governor configuration as stored in metadata. To see the currently effective configuration, use [sys.dm_resource_governor_configuration](../system-dynamic-management-views/sys-dm-resource-governor-configuration-transact-sql.md).
37+
38+
## Permissions
39+
40+
Requires the `VIEW ANY DEFINITION` permission to view contents.
41+
42+
## Examples
43+
44+
The following example shows how to get and compare the stored metadata values and the currently effective values of resource governor configuration.
45+
46+
```sql
47+
USE master;
48+
49+
-- Get the stored metadata
50+
SELECT OBJECT_SCHEMA_NAME(classifier_function_id) AS classifier_function_schema_name,
51+
OBJECT_NAME(classifier_function_id) AS classifier_function_name
52+
FROM sys.resource_governor_configuration;
53+
54+
-- Get the currently effective configuration
55+
SELECT OBJECT_SCHEMA_NAME(classifier_function_id) AS classifier_function_schema_name,
56+
OBJECT_NAME(classifier_function_id) AS classifier_function_name
57+
FROM sys.dm_resource_governor_configuration;
58+
```
59+
60+
## Related content
61+
62+
- [Resource governor catalog views (Transact-SQL)](../../relational-databases/system-catalog-views/resource-governor-catalog-views-transact-sql.md)
63+
- [Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/catalog-views-transact-sql.md)
64+
- [sys.dm_resource_governor_configuration (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-configuration-transact-sql.md)
65+
- [Resource governor](../../relational-databases/resource-governor/resource-governor.md)

docs/relational-databases/system-catalog-views/sys-resource-governor-external-resource-pools-transact-sql.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "sys.resource_governor_external_resource_pools (Transact-SQL)"
33
description: sys.resource_governor_external_resource_pools (Transact-SQL)
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "11/13/2017"
6+
ms.date: 02/11/2025
77
ms.service: sql
88
ms.subservice: system-objects
99
ms.topic: "reference"
@@ -18,37 +18,34 @@ helpviewer_keywords:
1818
dev_langs:
1919
- "TSQL"
2020
---
21+
2122
# sys.resource_governor_external_resource_pools (Transact-SQL)
23+
2224
[!INCLUDE [sqlserver2016](../../includes/applies-to-version/sqlserver2016.md)]
25+
2326
**Applies to:** [!INCLUDE[sssql15-md](../../includes/sssql16-md.md)] [!INCLUDE[rsql-productname-md](../../includes/rsql-productname-md.md)] and [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)] [!INCLUDE[rsql-productnamenew-md](../../includes/rsql-productnamenew-md.md)]
2427

2528
Returns the stored external resource pool configuration in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Each row of the view determines the configuration of a pool.
26-
27-
|Column name|Data type|Description|
28-
|-----------------|---------------|-----------------|
29-
|external_pool_id|**int**|Unique ID of the resource pool. Is not nullable.|
30-
|name|**sysname**|Name of the resource pool. Is not nullable.|
31-
|max_cpu_percent|**int**|Maximum average CPU bandwidth allowed for all requests in the resource pool when there is CPU contention. Is not nullable.|
32-
|max_memory_percent|**int**|Percentage of total server memory that can be used by requests in this resource pool. Is not nullable. The effective maximum depends on the pool minimums. For example, max_memory_percent can be set to 100, but the effective maximum is lower.|
33-
|max_processes|**int**|Maximum number of concurrent external processes. The default value, 0, specifies no limit. Is not nullable.|
34-
|version|**bigint**|Internal version number.|
35-
36-
## Permissions
37-
38-
Requires VIEW SERVER STATE permission.
3929

40-
## See also
30+
| Column name | Data type | Description |
31+
|:--|:--|:--|
32+
| `external_pool_id` | **int** | Unique ID of the resource pool. Is not nullable. |
33+
| `name` | **sysname** | Name of the resource pool. Is not nullable. |
34+
| `max_cpu_percent` | **int** | Maximum average CPU bandwidth allowed for all requests in the resource pool when there is CPU contention. Is not nullable. |
35+
| `max_memory_percent` | **int** | Percentage of total server memory that can be used by requests in this resource pool. Is not nullable. The effective maximum depends on the pool minimums. For example, max_memory_percent can be set to 100, but the effective maximum is lower. |
36+
| `max_processes` | **int** | Maximum number of concurrent external processes. The default value, 0, specifies no limit. Is not nullable. |
37+
| `version` | **bigint** | Internal version number. |
4138

42-
[Resource governance for machine learning in SQL Server](../../machine-learning/administration/resource-governor.md)
43-
44-
[Resource Governor Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/resource-governor-catalog-views-transact-sql.md)
45-
46-
[sys.dm_resource_governor_resource_pools &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql.md)
39+
## Permissions
4740

48-
[Resource Governor](../../relational-databases/resource-governor/resource-governor.md)
41+
Requires the `VIEW SERVER STATE` permission.
4942

50-
[sys.dm_resource_governor_resource_pool_affinity &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pool-affinity-transact-sql.md)
43+
## Related content
5144

45+
[Resource governance for machine learning in SQL Server](../../machine-learning/administration/resource-governor.md)
46+
[Resource governor Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/resource-governor-catalog-views-transact-sql.md)
47+
[sys.dm_resource_governor_resource_pools (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql.md)
48+
[Resource governor](../../relational-databases/resource-governor/resource-governor.md)
49+
[sys.dm_resource_governor_resource_pool_affinity (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pool-affinity-transact-sql.md)
5250
[external scripts enabled Server Configuration Option](../../database-engine/configure-windows/external-scripts-enabled-server-configuration-option.md)
53-
54-
[ALTER EXTERNAL RESOURCE POOL &#40;Transact-SQL&#41;](../../t-sql/statements/alter-external-resource-pool-transact-sql.md)
51+
[ALTER EXTERNAL RESOURCE POOL (Transact-SQL)](../../t-sql/statements/alter-external-resource-pool-transact-sql.md)

docs/relational-databases/system-catalog-views/sys-resource-governor-resource-pools-transact-sql.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: "sys.resource_governor_resource_pools (Transact-SQL)"
33
description: sys.resource_governor_resource_pools (Transact-SQL)
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "08/09/2016"
6+
ms.reviewer: dfurman
7+
ms.date: 02/11/2025
78
ms.service: sql
89
ms.subservice: system-objects
910
ms.topic: "reference"
@@ -17,33 +18,36 @@ helpviewer_keywords:
1718
dev_langs:
1819
- "TSQL"
1920
---
21+
2022
# sys.resource_governor_resource_pools (Transact-SQL)
21-
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
22-
23-
Returns the stored resource pool configuration in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Each row of the view determines the configuration of a pool.
24-
25-
|Column name|Data type|Description|
26-
|-----------------|---------------|-----------------|
27-
|pool_id|**int**|Unique ID of the resource pool. Is not nullable.|
28-
|name|**sysname**|Name of the resource pool. Is not nullable.|
29-
|min_cpu_percent|**int**|Guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention. Is not nullable.|
30-
|max_cpu_percent|**int**|Maximum average CPU bandwidth allowed for all requests in the resource pool when there is CPU contention. Is not nullable.|
31-
|min_memory_percent|**int**|Guaranteed amount of memory for all requests in the resource pool. This is not shared with other resource pools. Is not nullable.|
32-
|max_memory_percent|**int**|Percentage of total server memory that can be used by requests in this resource pool. Is not nullable. The effective maximum depends on the pool minimums. For example, max_memory_percent can be set to 100, but the effective maximum is lower.|
33-
|cap_cpu_percent|**int**|**Applies to**: [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] and later.<br /><br /> Hard cap on the CPU bandwidth that all requests in the resource pool will receive. Limits the maximum CPU bandwidth to the specified level. The allowed range for value is from 1 through 100.|
34-
|min_iops_per_volume|**int**|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.<br /><br /> The minimum I/O operations per second (IOPS) per volume setting for this pool. 0 = no reservation. Cannot be null.|
35-
|max_iops_per_volume|**int**|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.<br /><br /> The maximum I/O operations per second (IOPS) per volume setting for this pool. 0 = unlimited. Cannot be null.|
36-
37-
## Remarks
38-
The catalog view displays the stored metadata. To see the in-memory configuration, use the corresponding dynamic management view, [sys.dm_resource_governor_resource_pools &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql.md).
39-
40-
## Permissions
41-
Requires VIEW ANY DEFINITION permission to view contents, requires CONTROL SERVER permission to change contents.
42-
43-
## See Also
44-
[Resource Governor Catalog Views &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/resource-governor-catalog-views-transact-sql.md)
45-
[sys.dm_resource_governor_resource_pools &#40;Transact-SQL&#41;](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql.md)
46-
[Resource Governor](../../relational-databases/resource-governor/resource-governor.md)
47-
[sys.resource_governor_external_resource_pools &#40;Transact-SQL&#41;](../../relational-databases/system-catalog-views/sys-resource-governor-external-resource-pools-transact-sql.md)
48-
49-
23+
24+
[!INCLUDE [sql-asdbmi](../../includes/applies-to-version/sql-asdbmi.md)]
25+
26+
Returns the stored resource pool configuration. Each row represents a resource pool.
27+
28+
| Column name | Data type | Description |
29+
|:--|:--|:--|
30+
| `pool_id` | **int** | Unique ID of the resource pool. Is not nullable.|
31+
| `name` | **sysname** | Name of the resource pool. Is not nullable.|
32+
| `min_cpu_percent` | **int** | Guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention. Is not nullable. |
33+
| `max_cpu_percent` | **int** | Maximum average CPU bandwidth allowed for all requests in the resource pool when there is CPU contention. Is not nullable. |
34+
| `min_memory_percent` | **int** | Guaranteed amount of query workspace memory for all requests in the resource pool. This is not shared with other resource pools. Is not nullable. |
35+
| `max_memory_percent` | **int** | Percentage of total query workspace memory that can be used by requests in this resource pool. Is not nullable. The effective maximum depends on the other pool minimums. For example, `max_memory_percent` can be set to 100, but the effective maximum might be lower. Is not nullable. |
36+
| `cap_cpu_percent` | **int** | **Applies to**: [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] and later.<br /><br /> Hard cap on the CPU bandwidth that all requests in the resource pool receive. Limits the maximum CPU bandwidth to the specified level. The allowed range for value is from 1 through 100. Is not nullable. |
37+
| `min_iops_per_volume` | **int** | **Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.<br /><br /> The minimum I/O operations per second (IOPS) per volume setting for this pool. 0 = no reservation. Is not nullable. |
38+
| `max_iops_per_volume` | **int** | **Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.<br /><br /> The maximum I/O operations per second (IOPS) per volume setting for this pool. 0 = unlimited. Is not nullable. |
39+
40+
## Remarks
41+
42+
This catalog view displays the stored metadata. To see the currently effective resource governor configuration, use the corresponding dynamic management view, [sys.dm_resource_governor_resource_pools (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql.md).
43+
44+
## Permissions
45+
46+
Requires the `VIEW ANY DEFINITION` permission.
47+
48+
## Related content
49+
50+
- [Resource governor catalog views (Transact-SQL)](../../relational-databases/system-catalog-views/resource-governor-catalog-views-transact-sql.md)
51+
- [sys.dm_resource_governor_resource_pools (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql.md)
52+
- [Resource governor](../../relational-databases/resource-governor/resource-governor.md)
53+
- [sys.resource_governor_external_resource_pools (Transact-SQL)](../../relational-databases/system-catalog-views/sys-resource-governor-external-resource-pools-transact-sql.md)

0 commit comments

Comments
 (0)