Enable resource governor
Applies to: SQL Server Azure SQL Managed Instance
Resource governor is turned off by default. You can enable resource governor using either SQL Server Management Studio or Transact-SQL.
Enabling resource governor has the following results:
- The classifier function is executed for new connections so that workloads can be assigned to workload groups.
- The resource limits that are specified in resource governor configuration are honored and enforced.
Limitations
You can't use the ALTER RESOURCE GOVERNOR
statement as part of a user transaction.
Permissions
Enabling resource governor requires the CONTROL SERVER
permission.
Enable resource governor using Object Explorer in SQL Server Management Studio
To enable resource governor using Object Explorer in SQL Server Management Studio:
- In SQL Server Management Studio, open Object Explorer and expand the Management node down to Resource Governor.
- From the Resource Governor context menu, select Enable.
Enable resource governor using resource governor properties
To enable resource governor by using the resource governor properties page:
- In SQL Server Management Studio, open Object Explorer and expand the Management node down to Resource Governor.
- From the Resource Governor context menu, select Properties.
- Select the Enable Resource Governor check box and select OK.
Enable resource governor using Transact-SQL
To enable resource governor using Transact-SQL, execute the ALTER RESOURCE GOVERNOR RECONFIGURE
statement.
Example
The following example enables resource governor and makes all prior resource governor configuration changes effective.
ALTER RESOURCE GOVERNOR RECONFIGURE;