| title | Create a Workload Group | ||
|---|---|---|---|
| description | Learn how to create a workload group using SQL Server Management Studio or Transact-SQL. | ||
| author | WilliamDAssafMSFT | ||
| ms.author | wiassaf | ||
| ms.reviewer | dfurman | ||
| ms.date | 01/02/2025 | ||
| ms.service | sql | ||
| ms.subservice | performance | ||
| ms.topic | how-to | ||
| helpviewer_keywords |
|
||
| monikerRange | >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current |
[!INCLUDE SQL Server SQL MI]
You can create a workload group by using [!INCLUDEssManStudioFull] or [!INCLUDEtsql].
Creating a workload group requires the CONTROL SERVER permission.
To create a workload group using SQL Server Management Studio (SSMS):
- In Object Explorer, expand the Management node down to and including the resource pool that contains the workload group to be modified.
- Use the Workload Groups context menu, and select New Workload Group.
- In the Resource pools grid, ensure the resource pool where you want to add the workload group is selected.
- The Workload groups for resource pool grid has a new row with a blank name and default values in the other columns.
- Select the Name cell and enter a name for the workload group.
- Select any other cells in the row you want to change from their default settings, and enter new values.
- To save the changes, select OK.
To create a workload group by using [!INCLUDEtsql]:
- Execute the CREATE WORKLOAD GROUP statement specifying the values to be set.
- Execute the
ALTER RESOURCE GOVERNOR RECONFIGUREstatement for the changes to take effect.
The following example creates a workload group named groupAdhoc in the resource pool named poolAdhoc, and configures the maximum memory grant per request.
CREATE WORKLOAD GROUP groupAdhoc WITH (REQUEST_MAX_MEMORY_GRANT_PERCENT = 30)
USING poolAdhoc;
ALTER RESOURCE GOVERNOR RECONFIGURE;Resource pools can govern a variety of system resources. For more information, see CREATE WORKLOAD GROUP.
For more samples and a complete walkthrough, see Tutorial: Resource governor configuration examples and best practices.