Database Reference
In-Depth Information
23 DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
24 plan=>'SWINGBENCH_PLAN_SWINGBENCH1',
25 MGMT_P1 => 2,
26 GROUP_OR_SUBPLAN => 'OTHER_GROUPS',
27 comment => 'others group');
28
29 DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
30 plan=>'SWINGBENCH_PLAN_SWINGBENCH1',
31 MGMT_P1 => 3,
32 GROUP_OR_SUBPLAN => 'SWINGBENCH_GROUP',
33 comment => 'swingbench group');
34
35 DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
36 plan=>'SWINGBENCH_PLAN_SWINGBENCH1',
37 MGMT_P1 => 5,
38 GROUP_OR_SUBPLAN => 'SYS_GROUP',
39 comment => 'sys group');
40
41 DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(
42 attribute => DBMS_RESOURCE_MANAGER.ORACLE_USER,
43 value => 'SOE',
44 CONSUMER_GROUP => 'SWINGBENCH_GROUP');
45 end;
46 /
PL/SQL procedure successfully completed.
SYSTEM@SWINGBENCH1>
The code clears and creates a pending area, and then starts off by creating the new resource plan. The following
statements assign plan directives to the plan, which indicate the ratio of CPU to be used.
Validating and enabling the PDB resource plan
With the pending area firmly established, you need to validate it for logical errors in the plan description. The
procedure is the same as for the CDB plan, namely a call to validate_pending_area():
SYSTEM@SWINGBENCH1> begin
2 dbms_resource_manager.validate_pending_area;
3 end;
4 /
PL/SQL procedure successfully completed.
If that call doesn't return any errors, you can submit the pending area:
SYSTEM@SWINGBENCH1> begin
2 dbms_resource_manager.submit_pending_area;
3 end;
4 /
PL/SQL procedure successfully completed.
 
Search WWH ::




Custom Search