Delete a plan directive

2024-06-28 05:30:31  Updated

To delete a plan directive means to delete the limits 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

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

  2. You can call the DELETE_PLAN_DIRECTIVE subprogram in the DBMS_RESOURCE_MANAGER package to delete a plan directive.

    obclient [test]> CALL DBMS_RESOURCE_MANAGER.DELETE_PLAN_DIRECTIVE(
    PLAN => 'daytime',
    GROUP_OR_SUBPLAN => 'interactive_group'
    );
    

    PLAN specifies the name of the resource management plan, and GROUP_OR_SUBPLAN specifies the bound resource group.

    In this example, after the limit on the resources available for the interactive_group resource group is deleted, the SQL statements that originally use the resources in the interactive_group resource group will use the resources in the default resource group OTHER_GROUP.

  3. Query the oceanbase.DBA_RSRC_PLAN_DIRECTIVES view 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 set
    

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

References

DELETE_PLAN_DIRECTIVE

Contact Us