The DELETE_CONSUMER_GROUP procedure is used to delete a consumer group.
This procedure is commonly used in the cleanup phase of resource group lifecycle management: when a resource consumer group is no longer needed, first use SET_CONSUMER_GROUP_MAPPING to disassociate sessions from this consumer group, then call this procedure to delete it, thereby avoiding leftover invalid mappings.
Syntax
DBMS_RESOURCE_MANAGER.DELETE_CONSUMER_GROUP (
consumer_group IN VARCHAR(65535));
Parameters
Parameter |
Description |
|---|---|
| consumer_group | The name of the consumer group to be deleted. |
Considerations
- Before deleting a consumer group, we recommend that you first use
SET_CONSUMER_GROUP_MAPPINGto disassociate session rules mapped to this consumer group or redirect them to another consumer group. - This procedure takes effect at the tenant level and can only delete consumer groups within the current tenant.
Examples
Create a consumer group named group1, then delete it.
obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP('group1', 'test group');
obclient> CALL DBMS_RESOURCE_MANAGER.DELETE_CONSUMER_GROUP ('group1');