title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | monikerRange | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Create a Workload Group |
Learn how to create a workload group using SQL Server Management Studio or Transact-SQL. |
WilliamDAssafMSFT |
wiassaf |
dfurman |
01/02/2025 |
sql |
performance |
how-to |
|
>= 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 [[!INCLUDEssManStudioFull]](../../ssms/download-sql-server-management-studio-ssms.md):
- 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 RECONFIGURE
statement 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.