The UPDATE_PLAN_DIRECTIVE procedure is used to update a resource plan directive.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_RESOURCE_MANAGER.UPDATE_PLAN_DIRECTIVE (
PLAN IN VARCHAR2,
GROUP_OR_SUBPLAN IN VARCHAR2,
NEW_COMMENT IN VARCHAR2 DEFAULT NULL,
NEW_MGMT_P1 IN INT DEFAULT NULL,
NEW_UTILIZATION_LIMIT IN INT DEFAULT NULL,
NEW_MIN_IOPS IN INT DEFAULT NULL,
NEW_MAX_IOPS IN INT DEFAULT NULL,
NEW_WEIGHT_IOPS IN INT DEFAULT NULL,
NEW_MAX_NET_BANDWIDTH IN INT DEFAULT NULL,
NEW_NET_BANDWIDTH_WEIGHT IN INT DEFAULT NULL);
Parameters
| Parameter | Description |
|---|---|
| PLAN | The name of the resource plan. |
| GROUP_OR_SUBPLAN | The name of the resource group or subplan. |
| NEW_COMMENT | The comment for the plan directive. |
| NEW_MGMT_P1 | The maximum percentage of CPU resources that can be used when the system is under heavy load. |
| NEW_UTILIZATION_LIMIT | The maximum CPU utilization limit. The value of this parameter ranges from 0 to 100. A value of 100 indicates that the tenant can use all CPU resources. A value of 20 indicates that the tenant can use up to 20% of the CPU resources. |
| NEW_MIN_IOPS | The reserved IOPS resources for the resource group when I/O contention occurs. The sum of all reserved IOPS resources cannot exceed 100. |
| NEW_MAX_IOPS | The maximum IOPS resources that can be used by the resource group. The sum of all reserved IOPS resources can exceed 100. |
| NEW_WEIGHT_IOPS | The weight of IOPS resources. The sum of all reserved IOPS resources can exceed 100. |
| NEW_MAX_NET_BANDWIDTH | The maximum network bandwidth that can be used by the resource group. The sum of all reserved network bandwidth resources can exceed 100. |
| NEW_NET_BANDWIDTH_WEIGHT | The weight of network bandwidth resources. The sum of all reserved network bandwidth resources can exceed 100. |
Considerations
If you do not specify parameters for the UPDATE_PLAN_DIRECTIVE procedure, the parameter values remain unchanged in the data dictionary.
To set any numeric parameter in a resource plan directive to zero or invalid, use the UPDATE_PLAN_DIRECTIVE procedure and set the parameter to -1.
Examples
Update the comment of the plan directive for the resource group
group1bound to the resource planDAY.obclient [SYS]> delimiter //obclient [SYS]> BEGIN DBMS_RESOURCE_MANAGER.UPDATE_PLAN_DIRECTIVE('DAY','group1','Intermediate-level group'); END ;//obclient [SYS]> delimiter ;Update the resource plan content for the resource group
big_groupbound to the resource planplan_a, including CPU, IOPS, and network bandwidth resources.obclient [SYS]> delimiter //obclient [SYS]> BEGIN DBMS_RESOURCE_MANAGER.UPDATE_PLAN_DIRECTIVE( PLAN => 'plan_a', GROUP_OR_SUBPLAN => 'big_group', NEW_COMMENT => 'new', NEW_MGMT_P1 => 40, NEW_UTILIZATION_LIMIT => 60, NEW_MIN_IOPS => 20, NEW_MAX_IOPS => 100, NEW_WEIGHT_IOPS => 10, NEW_MAX_NET_BANDWIDTH => 60, NEW_NET_BANDWIDTH_WEIGHT => 60); END ;//obclient [SYS]> delimiter ;
References
For more information about how to update a resource plan directive, see Update a resource plan directive.
