Deleting a resource management plan config means removing the CPU resource limits for the resource group in the resource management plan. You can use the DELETE_PLAN_DIRECTIVE subprogram in the DBMS_RESOURCE_MANAGER package to accomplish this.
Prerequisites
Before deleting a resource management plan config, make sure that the corresponding resource management plan and resource group exist. Otherwise, the deletion may fail.
Procedure
Log in to a MySQL tenant of the cluster using the administrator.
Call the
DELETE_PLAN_DIRECTIVEsubprogram in theDBMS_RESOURCE_MANAGERpackage to delete the resource management plan config.obclient [test]> CALL DBMS_RESOURCE_MANAGER.DELETE_PLAN_DIRECTIVE( PLAN => 'daytime', GROUP_OR_SUBPLAN => 'interactive_group' );Here,
PLANspecifies the resource management plan, andGROUP_OR_SUBPLANspecifies the bound resource group.In this example, after the CPU resource limits for the
interactive_groupresource group are removed, SQL statements that were previously using the resources in theinteractive_groupresource group will now use the resources in the default resource groupOTHER_GROUP.Query the
oceanbase.DBA_RSRC_PLAN_DIRECTIVESview to verify whether the resource management plan config has been deleted.obclient [test]> SELECT PLAN, GROUP_OR_SUBPLAN FROM oceanbase.DBA_RSRC_PLAN_DIRECTIVES; +---------+------------------+ | PLAN | GROUP_OR_SUBPLAN | +---------+------------------+ | DAY | group1 | | daytime | batch_group | +---------+------------------+ 2 rows in setFor more information about the
oceanbase.DBA_RSRC_PLAN_DIRECTIVESview, see oceanbase.DBA_RSRC_PLAN_DIRECTIVES.