Delete a resource group

2024-06-28 05:30:31  Updated

You can call the DELETE_CONSUMER_GROUP subprogram in the DBMS_RESOURCE_MANAGER package to delete an idle resource group.

Prerequisites

The resource group to be deleted exists.

Considerations

After a resource group is deleted, the plan directive associated with the resource group is also deleted.

Procedure

  1. Log on to a MySQL tenant of the cluster as the administrator of the tenant.

  2. Call the DELETE_CONSUMER_GROUP subprogram in the DBMS_RESOURCE_MANAGER package to delete the resource group.

    obclient [test]> CALL DBMS_RESOURCE_MANAGER.DELETE_CONSUMER_GROUP(
    CONSUMER_GROUP => 'interactive_group'
    );
    

    Here, CONSUMER_GROUP specifies the name of the resource group to be deleted.

  3. Query the oceanbase.DBA_RSRC_CONSUMER_GROUPS view to verify whether the resource group is deleted.

    obclient [test]> SELECT CONSUMER_GROUP_ID, CONSUMER_GROUP, COMMENTS FROM oceanbase.DBA_RSRC_CONSUMER_GROUPS;
    +-------------------+----------------+-----------------+
    | CONSUMER_GROUP_ID | CONSUMER_GROUP | COMMENTS        |
    +-------------------+----------------+-----------------+
    |                 5 | batch_group    | AP              |
    |                 2 | group1         | Transaction processing team      |
    |                 3 | group2         | Daily O&M team      |
    |                 0 | OTHER_GROUPS   | NULL            |
    |                 1 | SYS_GROUP      | NULL            |
    +-------------------+----------------+-----------------+
    5 rows in set
    

    For more information about the oceanbase.DBA_RSRC_CONSUMER_GROUPS view, see oceanbase.DBA_RSRC_CONSUMER_GROUPS.

References

DELETE_CONSUMER_GROUP

Contact Us