Редагувати

Поділитися через


Enable Resource Governor

Applies to: SQL Server Azure SQL Managed Instance

The Resource Governor is turned off by default. You can enable the Resource Governor by using either SQL Server Management Studio or Transact-SQL.

Before You Begin

Enabling the resource governor has the following results:

  • The classifier function is run for new connections so that their workloads can be assigned to workload groups.

  • The resource limits that are specified in the Resource Governor configuration are honored and enforced.

  • Requests that existed before enabling Resource Governor are affected by any configuration changes that were made when the Resource Governor was disabled.

Limitations and Restrictions

You cannot use the ALTER RESOURCE GOVERNOR statement to enable Resource Governor when in a user transaction.

Permissions

Enabling the Resource Governor requires CONTROL SERVER permission.

Enable Resource Governor Using Object Explorer

To enable the Resource Governor by using Object Explorer

  1. In SQL Server Management Studio, open Object Explorer and recursively expand the Management node down to Resource Governor.

  2. Right-click Resource Governor, and then click Enable.

Enable Resource Governor Using Resource Governor Properties

To enable the Resource Governor by using the Resource Governor Properties page

  1. In SQL Server Management Studio, open Object Explorer and recursively expand the Management node down to Resource Governor.

  2. Right-click Resource Governor and then click Properties, this opens the Resource Governor Properties page.

  3. Click the Enable Resource Governor check box, and then click OK.

Enable Resource Governor Using Transact-SQL

To enable the Resource Governor by using Transact-SQL

  1. Run the ALTER RESOURCE GOVERNOR RECONFIGURE statement.

Example (Transact-SQL)

The following example enables the Resource Governor.

ALTER RESOURCE GOVERNOR RECONFIGURE;  
GO  

See Also

Resource Governor
Disable Resource Governor
Resource Governor Resource Pool
Resource Governor Workload Group
Resource Governor Classifier Function
ALTER RESOURCE GOVERNOR (Transact-SQL)