|
- select * from dba_rsrc_plans;
- select * from dba_rsrc_plan_directives d where d.plan='PLAN1';
- select * from dba_rsrc_consumer_groups;
- select * from dba_rsrc_group_mappings;
- ---
- select * from dba_rsrc_plans where plan like 'PLAN%';
- BEGIN
- dbms_resource_manager.clear_pending_area();
- dbms_resource_manager.create_pending_area();
- dbms_resource_manager.create_plan( plan => 'PLAN2', comment => 'PLAN2',CPU_MTH=>'RATIO' );
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'SYS_GROUP',
- comment => 'SYS_GROUP',
- mgmt_p1 => 5);
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'GROUP1',
- comment => 'GROUP1',
- mgmt_p1 => 3);
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'GROUP2',
- comment => 'GROUP2',
- mgmt_p1 => 2);
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'OTHER_GROUPS',
- comment => 'OTHER_GROUPS',
- mgmt_p1 => 1
- );
- dbms_resource_manager.submit_pending_area();
- END;
- select s.USERNAME, s.RESOURCE_CONSUMER_GROUP
- from v_$session s where s.TERMINAL='pts/5';
-
-
- select * from dba_users u where u.username='SH';
-
- alter user sh identified by oracle_4U account unlock;
- select * from dba_rsrc_plans where plan like 'PLAN%';
- select * from dba_rsrc_plan_directives d where d.plan='PLAN1';
- BEGIN
- dbms_resource_manager.clear_pending_area();
- dbms_resource_manager.create_pending_area();
- dbms_resource_manager.create_plan( plan => 'PLAN2', comment => 'PLAN2',CPU_MTH=>'RATIO' );
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'SYS_GROUP',
- comment => 'SYS_GROUP',
- mgmt_p1 => 5);
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'GROUP1',
- comment => 'GROUP1',
- mgmt_p1 => 3);
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'GROUP2',
- comment => 'GROUP2',
- mgmt_p1 => 2);
- dbms_resource_manager.create_plan_directive(
- plan => 'PLAN2',
- group_or_subplan => 'OTHER_GROUPS',
- comment => 'OTHER_GROUPS',
- mgmt_p1 => 1
- );
- dbms_resource_manager.submit_pending_area();
- END;
- select s.USERNAME, s.RESOURCE_CONSUMER_GROUP, s.status ,s.TERMINAL
- from v_$session s where s.TERMINAL in ('pts/2');
-
-
- select * from dba_users u where u.username='SH';
-
- alter user sh identified by oracle_4U account unlock;
-
- BEGIN
- dbms_resource_manager.clear_pending_area();
- dbms_resource_manager.create_pending_area();
- dbms_resource_manager.update_plan_directive(
- plan => 'PLAN1',
- group_or_subplan => 'GROUP1',
- new_max_idle_blocker_time =>-1
- );
- dbms_resource_manager.submit_pending_area();
- END;
-
- ----
- select * from dba_rsrc_plan_directives d where d.plan='PLAN1';
- ---
- select * from resource_cost;
- alter resource cost CPU_PER_SESSION 10 LOGICAL_READS_PER_SESSION 5 ;
-
-
复制代码
|
|