Skip to content

How to build a dummy resource plan

Often switching off resource plan feature of Oracle database is desired.
Unfortunately setting parameter RESOURCE_MANAGER_PLAN to empty string does not help, because it does not disable switching to another resource plan, e.g. with dbms_scheduler.

Following procedure prevents this switching.

1. Creation of a dummy resource plan, e.g. TEST_PLAN:


BEGIN
DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CREATE_PLAN(
plan =>'TEST_PLAN',
comment => 'plan for TEST',
mgmt_mth => 'EMPHASIS',
active_sess_pool_mth => 'ACTIVE_SESS_POOL_ABSOLUTE',
parallel_degree_limit_mth => 'PARALLEL_DEGREE_LIMIT_ABSOLUTE');
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
plan =>'TEST_PLAN',
group_or_subplan => 'OTHER_GROUPS',
comment => 'dummy directive'
);
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
/

The only limitation is the number of available CPUs specified in parameter CPU_COUNT, resource manager enforces this limitation. The resource plan INTERNAL_PLAN is for internal use, so I would not use it.

2. Setting of parameter resource_manager_plan:


alter system set resource_manager_plan='FORCE:TEST_PLAN';

This setting prevents switching to another resource plan.

Caveat:

With this setting, deletion of specified resource plan (e.g. TEST_PLAN) causes database to crash:


alter system set resource_manager_plan='FORCE:TEST_PLAN';
BEGIN
DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.DELETE_PLAN('TEST_PLAN');
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
/
BEGIN
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 73473
Session ID: 24 Serial number: 17611

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Oracle Team

Oracle Team

Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.View Author posts

1,009 posts since December 2010

Most read in Database

The Database posts our readers open most: the all-time favourites, and what is trending right now.

Leave a Comment

Your email address will not be published. Required fields are marked *