To delete a plan directive means to delete the limit on the CPU resources available for the resource group in the resource management plan. You can call the DELETE_PLAN_DIRECTIVE subprogram in the DBMS_RESOURCE_MANAGER package to delete a plan directive.
Prerequisites
The resource management plan and resource group configured in the plan directive exist. Otherwise, an error occurs when you delete the plan directive.
Procedure
Log on to a MySQL tenant of the cluster as the administrator of the tenant.
You can call the
DELETE_PLAN_DIRECTIVEsubprogram in theDBMS_RESOURCE_MANAGERpackage to delete a plan directive.obclient [test]> CALL DBMS_RESOURCE_MANAGER.DELETE_PLAN_DIRECTIVE( PLAN => 'daytime', GROUP_OR_SUBPLAN => 'interactive_group' );PLANspecifies the name of the resource management plan, andGROUP_OR_SUBPLANspecifies the bound resource group.In this example, after the limit on the resources available for the
interactive_groupresource group is deleted, the SQL statements that originally use the resources in theinteractive_groupresource group will use the resources in the default resource groupOTHER_GROUP.Query the
oceanbase.DBA_RSRC_PLAN_DIRECTIVESview to verify whether the plan directive is 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.