Database Reference
In-Depth Information
as having standard priority; and LOW_PRIORITY for low priority. These consumer groups map to the database resource
plan. This is done using the Oracle provided PL/SQL packages using the following steps:
Step 7.1 Create a Pending Work Area
While defining ODRM (Oracle dynamic resource mastering) policies irrespective of the type of policy being defined,
it's required that an initial workspace or working area be defined. This allows for validation and testing of the policies
before committing or saving them for actual usage. The pending/work area is created using the following:
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
END;
/
in an Oracle Database 12c multitenant database environment, if the resource manager is added to the pDb
database, prior to setting the pending area, the control should be moved to the pDb database.
Note
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> ALTER SESSION SET CONTAINER=SPDB;
if the resource manager is added to the container database, the appropriate pl/sQl packages should be used.
For example, instead of using the DBMS_RESOURCE_MANAGER.CREATE_PLAN used in a pDb or non-CDb database, when
creating a plan at the container level, the DBMS_RESOURCE_MANAGER.CREATE_CDB_PLAN procedure would be used.
a step-by-step description of implementing the Dbrm (database resource manager) at the container database can be
found in the appendix section.
Step 7.2 Define the Consumer Group
Once a working area has been created, the next step is to create all the different levels of priority. This is done using
the CREATE_CONSUMER_GROUP procedure:
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP
(CONSUMER_GROUP=>'HIGH_PRIORITY',
COMMENT=>'High Priority group');
END;
/
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP
(CONSUMER_GROUP=>'STD_PRIORITY',
COMMENT=>'Standard Priority group');
END;
/
 
 
Search WWH ::




Custom Search