The DELETE_PLAN procedure is used to delete a specified resource plan and all the plan instructions it references.
This procedure is commonly used in resource plan decommissioning scenarios: when a resource plan is no longer in use, you can call this procedure to delete it along with all its plan instructions, eliminating the need to first clean up by calling DELETE_PLAN_DIRECTIVE individually for each instruction.
Syntax
DBMS_RESOURCE_MANAGER.DELETE_PLAN (
plan IN VARCHAR(65535));
Parameters
Parameter |
Description |
|---|---|
| plan | The name of the resource plan to be deleted. |
Considerations
- You cannot delete the currently active resource plan (the one specified by the system variable
resource_manager_plan). Otherwise, an errorNot supported feature or functionis returned, and a messagedeleting active planis displayed. Before deleting it, you must switchresource_manager_planto another plan or set it to null. - When you delete a plan, all plan directives referenced by that plan are also deleted.
Examples
Create a resource plan named NIGHT, then delete it.
obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN('NIGHT', 'night plan');
obclient> CALL DBMS_RESOURCE_MANAGER.DELETE_PLAN('NIGHT');