Redigera

Dela via


Delete a Resource Pool

Applies to: SQL Server Azure SQL Managed Instance

You can delete a resource pool by using either SQL Server Management Studio or Transact-SQL.

Before You Begin

You cannot delete a resource pool if it contains workload groups.

Limitations and Restrictions

You cannot delete the Resource Governor default or internal resource pools. You cannot delete a resource pool if it contains workload groups. For more information, see Delete a Workload Group.

Permissions

Deleting a resource pool requires CONTROL SERVER permission.

Delete a Resource Pool Using Object Explorer

To delete a resource pool by using SQL Server Management Studio

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

  2. Right-click the resource pool to be deleted, and then click Delete.

  3. In the Delete Object window, the resource pool is listed in the Object to be deleted list. To delete the resource pool, click OK.

    Note

    If the resource pool that you are trying to delete contains a workload group, this action will fail.

Delete a Resource Pool Using Transact-SQL

To delete a resource pool by using Transact-SQL

  1. Run the DROP RESOURCE POOL or DROP EXTERNAL RESOURCE POOL statement specifying the name of the resource pool to delete.

  2. Run the ALTER RESOURCE GOVERNOR RECONFIGURE statement.

Example (Transact-SQL)

The following example drops a workload group named poolAdhoc.

DROP RESOURCE POOL poolAdhoc;  
GO  
ALTER RESOURCE GOVERNOR RECONFIGURE;  
GO  

See Also

Resource Governor
Resource Governor Resource Pool
Create a Resource Pool
Change Resource Pool Settings
Resource Governor Workload Group
Resource Governor Classifier Function
DROP WORKLOAD GROUP (Transact-SQL)
DROP RESOURCE POOL (Transact-SQL)
ALTER RESOURCE GOVERNOR (Transact-SQL)
DROP EXTERNAL RESOURCE POOL (Transact-SQL)
CREATE EXTERNAL RESOURCE POOL (Transact-SQL)
ALTER EXTERNAL RESOURCE POOL (Transact-SQL)