Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit e8578fd

Browse files
committed
updates
1 parent 260b62f commit e8578fd

2 files changed

Lines changed: 138 additions & 8 deletions

File tree

docs/t-sql/statements/create-workload-group-transact-sql.md

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Specifies the maximum degree of parallelism (DOP) for parallel requests. *value*
116116
- After DOP is configured, it can only be lowered on grant memory pressure. Workload group reconfiguration is not visible while waiting in the grant memory queue.
117117

118118
GROUP_MAX_REQUESTS = *value*
119-
Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group. *value* must be a 0 or a positive integer. The default setting for *value* is 0, and allows unlimited requests. When the maximum concurrent requests are reached, a user in that group can log in, but is placed in a wait state until concurrent requests are dropped below the value specified.
119+
Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group. *value* must be a 0 or a positive integer. The default setting for *value* is 0, and allows unlimited requests. When the maximum concurrent requests are reached, a user in that group can sign in, but is placed in a wait state until concurrent requests are dropped below the value specified.
120120

121121
USING { *pool_name* | **"default"** }
122122
Associates the workload group with the user-defined resource pool identified by *pool_name*. This in effect puts the workload group in the resource pool. If *pool_name* is not provided, or if the USING argument is not used, the workload group is put in the predefined Resource Governor default pool.
@@ -127,9 +127,9 @@ Associates the workload group with the user-defined resource pool identified by
127127
> Predefined workload groups and resource pools all use lower case names, such as "default". This should be taken into account for servers that use case-sensitive collation. Servers with case-insensitive collation, such as SQL_Latin1_General_CP1_CI_AS, will treat "default" and "Default" as the same.
128128
129129
EXTERNAL external_pool_name | "default"
130-
**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ( [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)]).
130+
**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)]).
131131

132-
Workload group can specify an external resource pool. You can define a workload group and associate with 2 pools:
132+
Workload group can specify an external resource pool. You can define a workload group and associate with two pools:
133133

134134
- A resource pool for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] workloads and queries
135135
- An external resource pool for external processes. For more information, see [sp_execute_external_script (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md).
@@ -180,6 +180,8 @@ GO
180180

181181
Creates a workload group. The workload group can be used for reserving or limiting resources for a classified request. Workload groups are used to define the amount of resources that are allocated per request. Workload groups can also be used limit the query execution time. Once the statement completes, the settings are in effect.
182182

183+
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md).
184+
183185
```
184186
CREATE WORKLOAD GROUP group_name
185187
WITH
@@ -192,4 +194,67 @@ CREATE WORKLOAD GROUP group_name
192194
[ ; ]
193195
```
194196

197+
*group_name*</br>
198+
Specifies the name by which the workload group is identified. group_name is a sysname. It can be up to 128 characters long and must be unique within the instance.
199+
200+
*MIN_PERCENTAGE_RESOURCE* = value</br>
201+
Specifies a guaranteed minimum resource allocation for this workload group that is not shared with other workload groups. value is an integer range from 0 to 100. The sum of min_percentage_resource across all workload groups cannot exceed 100. The value for min_percentage_resource cannot be greater than cap_percentage_resource.
202+
203+
*CAP_PERCENTAGE_RESOURCE* = value</br>
204+
Specifies the maximum resource utilization for all requests in a workload group. The allowed range for value is 1 through 100. The value for cap_percentage_resource must be greater than min_percentage_resource.
205+
206+
*REQUEST_MIN_RESOURCE_GRANT_PERCENT* = value</br>
207+
Sets the minimum amount of resources allocated per request. value is a required parameter with a decimal range between 0.75 to 100.00. The value for request_min_resource_grant_percent must be a multiple of 0.25, must be a factor of min_percentage_resource, and be less than cap_percentage_resource.
208+
209+
For example:
210+
211+
```sql
212+
CREATE WORKLOAD GROUP wgSample WITH
213+
( MIN_PERCENTAGE_RESOURCE = 26 -- integer value
214+
,REQUEST_MIN_RESOURCE_GRANT_PERCENT = 3.25 -- factor of 26 (8 concurrency)
215+
,CAP_PERCENTAGE_RESOURCE = 100 )
216+
```
217+
218+
Consider the values that are used for resource classes as a guideline for request_min_resource_grant_percent. The table below contains resource allocations for Gen2.
219+
220+
|Resource Class|Percent Resources|
221+
|---|---|
222+
|Smallrc|3%|
223+
|Mediumrc|10%|
224+
|Largerc|22%|
225+
|Xlargerc|70%|
226+
|||
227+
228+
*REQUEST_MAX_RESOURCE_GRANT_PERCENT* = value</br>
229+
Sets the maximum amount of resources allocated per request. value is an optional parameter with a default value equal to the request_min_resource_grant_percent. value must be greater than or equal to request_min_resource_grant_percent. When the value of request_max_resource_grant_percent is greater than request_min_resource_grant_percent and system resources are available, additional resources are allocated to a request.
230+
231+
*IMPORTANCE* = { LOW | BELOW_NORMAL | NORMAL | ABOVE_NORMAL | HIGH }</br>
232+
Specifies the default importance of a request for the workload group. Importance is one of the following, with NORMAL being the default:
233+
• LOW
234+
• BELOW_NORMAL
235+
• NORMAL (default)
236+
• ABOVE_NORMAL
237+
• HIGH
238+
239+
Importance set at the workload group is a default importance for all requests in the workload group. A user can also set importance at the classifier level, which can override the workload group importance setting. This allows for differentiation of requests within a workload group and influence for non-reserved resources. When the sum of min_percentage_resource across workload groups is less than 100, there are non-reserved resources that are assigned on a basis of importance.
240+
241+
*QUERY_EXECUTION_TIMEOUT_SEC* = value</br>
242+
Specifies the maximum time, in seconds, that a query can execute before it is canceled. value must be 0 or a positive integer. The default setting for value is 0, which means unlimited. The time spent waiting in the request queue is not counted towards query execution.
243+
244+
## Effective Values
245+
246+
The parameters min_percentage_resource, cap_percentage_resource, request_min_resource_grant_percent and request_max_resource_grant_percent have effective values that are adjusted in the context of the current service level and the configuration of other workload groups.
247+
248+
The supported concurrency per service level remains the same as when resource classes were used to define resource grants per query, hence, the supported values for request_min_resource_grant_percent is dependent on the service level the instance is set to. At the lowest service level, DW100c, 4 concurrency is supported. The effective request_min_resource_grant_percent for a configured workload group can be 25% or higher.
249+
250+
Similarly, request_min_resource_grant_percent, min_percentage_resource must be greater than or equal to the effective request_min_resource_grant_percent. A workload group with min_percentage_resource configured that is less than effective min_percentage_resource has the value adjusted to zero at run time. When this happens, the resources configured for min_percentage_resource are sharable across all workload groups. For example, the workload group wgAdHoc with a min_percentage_resource of 10% running at DW1000c would have an effective min_percentage_resource of 10% (3.25% is the minimum supported value at DW1000c). wgAdhoc at DW100c would have an effective min_percentage_resource of 0%. The 10% configured for wgAdhoc would be shared across all workload groups.
251+
252+
Cap_percentage_resource also has an effective value. If a workload group wgAdhoc is configured with a cap_percentage_resource of 100% and another workload group wgDashboards is created with 25% min_percentage_resource, the effective cap_percentage_resource for wgAdhoc becomes 75%.
253+
254+
## Permissions
255+
256+
Requires CONTROL DATABASE permission
257+
258+
## See also
259+
195260
::: moniker-end

docs/t-sql/statements/drop-workload-group-transact-sql.md

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,26 @@ dev_langs:
1414
- "TSQL"
1515
helpviewer_keywords:
1616
- "DROP WORKLOAD GROUP statement"
17-
ms.assetid: 1cd68450-5b58-4106-a2bc-54197ced8616
1817
author: CarlRabeler
1918
ms.author: carlrab
19+
monikerRange: ">=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azure-sqldw-latest||=azuresqldb-mi-current"
2020
---
2121
# DROP WORKLOAD GROUP (Transact-SQL)
22-
[!INCLUDE[tsql-appliesto-ss2008-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-xxxx-xxxx-xxx-md.md)]
22+
23+
## Click a product!
24+
25+
In the following row, click whichever product name you're interested in. The click displays different content here on this webpage, appropriate for whichever product you click.
26+
27+
::: moniker range=">=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current||=sqlallproducts-allversions"
28+
29+
> |||||
30+
> |---|---|---|---|
31+
> |**_\* SQL Server \*_** &nbsp;|[SQL Database<br />managed instance](create-workload-group-transact-sql.md?view=azuresqldb-mi-current)|[SQL Data<br />Warehouse](create-workload-group-transact-sql.md?view=azure-sqldw-latest)|
32+
33+
&nbsp;
34+
35+
## SQL Server and SQL Database managed instance
36+
2337

2438
Drops an existing user-defined Resource Governor workload group.
2539

@@ -52,10 +66,12 @@ DROP WORKLOAD GROUP group_name
5266

5367
- In a scenario in which you have issued the DROP WORKLOAD GROUP statement but decide that you do not want to explicitly stop sessions to apply the change, you can re-create the group by using the same name that it had before you issued the DROP statement, and then move the group to the original resource pool. To apply the changes, run the ALTER RESOURCE GOVERNOR RECONFIGURE statement.
5468

55-
## Permissions
69+
## Permissions
70+
5671
Requires CONTROL SERVER permission.
5772

58-
## Examples
73+
## Examples
74+
5975
The following example drops the workload group named `adhoc`.
6076

6177
```
@@ -74,4 +90,53 @@ GO
7490
[DROP RESOURCE POOL &#40;Transact-SQL&#41;](../../t-sql/statements/drop-resource-pool-transact-sql.md)
7591
[ALTER RESOURCE GOVERNOR &#40;Transact-SQL&#41;](../../t-sql/statements/alter-resource-governor-transact-sql.md)
7692

77-
93+
::: moniker-end
94+
::: moniker range="=azure-sqldw-latest||=sqlallproducts-allversions"
95+
96+
> ||||
97+
> |---|---|---|
98+
> |[SQL Server](create-workload-group-transact-sql.md?view=sql-server-2017)||[SQL Database<br />managed instance](create-workload-group-transact-sql.md?view=azuresqldb-mi-current)||**_\* SQL Data<br />Warehouse \*_** &nbsp;||||
99+
100+
&nbsp;
101+
102+
## SQL Data Warehouse
103+
104+
Drops a workload group. Once the statement completes, the settings are in effect.
105+
106+
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md).
107+
108+
## Syntax
109+
110+
```
111+
DROP WORKLOAD GROUP group_name
112+
```
113+
114+
## Arguments
115+
116+
*group_name*
117+
Is the name of an existing user-defined workload group.
118+
119+
## Remarks
120+
121+
A workload group cannot be dropped if classifiers exist for the workload group. Drop the classifiers before the workload group is dropped. If there are active requests using resources from the workload group being dropped, the drop workload statement is blocked behind them.
122+
123+
## Examples
124+
125+
Use the following code example to determine which classifiers need to be dropped before the workload group can be dropped.
126+
127+
```sql
128+
SELECT c.name as classifier_name
129+
,'DROP WORKLOAD CLASSIFIER '+c.name as drop_command
130+
FROM sys.workload_management_workload_classifiers c
131+
JOIN sys.workload_management_workload_groups g
132+
ON c.group_name = g.name
133+
WHERE g.name = 'wgXYZ' --change the filter to the workload being dropped
134+
```
135+
136+
## Permissions
137+
138+
Requires CONTROL DATABASE permission
139+
140+
## See also
141+
142+
::: moniker-end

0 commit comments

Comments
 (0)