Skip to main content
The DROP RESOURCE GROUP removes a .
This feature is in and subject to change. To share feedback and/or issues, contact Support.
To use DROP RESOURCE GROUP, you must first .

Required privileges

Only members of the can drop resource groups.

Synopsis

drop_resource_group syntax diagram

Parameters

Considerations

DROP RESOURCE GROUP does not check whether sessions, roles, or databases are assigned to the resource group. After a group is dropped:
  • Sessions that are assigned to the group keep the group name in their resource_group . Their work runs in the built-in , and the session receives a notice.
  • Role and database defaults that name the group are not removed. New sessions that use those defaults also run in the default resource group.
To find role and database defaults that name a resource group before you drop it, use .

Examples

Drop a resource group

The following statements create a resource group named batch and then drop it:

Drop a resource group only if it exists

The following statement does nothing, because the batch resource group no longer exists:
Without IF EXISTS, the statement returns an error:

Drop a resource group that a session is assigned to

The following statements create a resource group named reporting and assign the current session to it:
Drop the resource group:
After the change reaches the node, the session’s work runs in the default resource group, and a statement in the session returns a notice. The resource_group session variable still shows the dropped group’s name:
To assign the session to a resource group that exists, set the resource_group session variable again, or reset it with RESET resource_group.

See also