| title | DROP WORKLOAD GROUP (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 01/10/2020 | ||
| ms.prod | sql | ||
| ms.prod_service | sql-database | ||
| ms.reviewer | |||
| ms.technology | t-sql | ||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| author | CarlRabeler | ||
| ms.author | carlrab | ||
| monikerRange | >=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azure-sqldw-latest||=azuresqldb-mi-current |
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.
::: moniker range=">=sql-server-2016||>=sql-server-linux-2017||=sqlallproducts-allversions"
| * SQL Server * | SQL Database managed instance |
Azure Synapse Analytics |
[!INCLUDE DROP WORKLOAD GROUP]
::: moniker-end ::: moniker range="=azuresqldb-mi-current||=sqlallproducts-allversions"
| SQL Server | * SQL Database managed instance * |
Azure Synapse Analytics |
[!INCLUDE DROP WORKLOAD GROUP]
::: moniker-end ::: moniker range="=azure-sqldw-latest||=sqlallproducts-allversions"
| SQL Server | SQL Database managed instance |
* Azure Synapse Analytics * |
Drops a workload group. Once the statement completes, the settings are in effect.
Transact-SQL Syntax Conventions.
DROP WORKLOAD GROUP group_name
group_name
Is the name of an existing user-defined workload group.
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.
Use the following code example to determine which classifiers need to be dropped before the workload group can be dropped.
SELECT c.name as classifier_name
,'DROP WORKLOAD CLASSIFIER '+c.name as drop_command
FROM sys.workload_management_workload_classifiers c
JOIN sys.workload_management_workload_groups g
ON c.group_name = g.name
WHERE g.name = 'wgXYZ' --change the filter to the workload being droppedRequires CONTROL DATABASE permission
- CREATE WORKLOAD GROUP (Transact-SQL)
- ALTER WORKLOAD GROUP (Transact-SQL)
- sys.workload_management_workload_groups
- sys.dm_workload_management_workload_groups_stats
- Quickstart: Configure workload isolation using T-SQL
::: moniker-end