Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Oracle Resource Manager

7,705 views

Published on

Oracle Resource Manager Training PPT

Published in: Technology
  • Be the first to comment

Oracle Resource Manager

  1. 1. Oracle Resource Manager<br />Kamus@ACOUG<br />
  2. 2. About ACOUG<br />ACOUG: All China Oracle User Group<br />http://acoug.org<br />
  3. 3. About Me<br />张乐奕 Kamus<br />http://www.dbform.com<br />Oracle -> 恩墨科技 (http://www.enmou.com)<br />Oracle & World of Warcraft<br />
  4. 4. Resource Management <br />USERS<br />DBA_USERS. <br />INITIAL_RSRC_CONSUMER_GROUP<br />
  5. 5. Simple Plan Example<br />
  6. 6. Sub Plan Example<br />
  7. 7. Consumer Group Mappings<br />Specific Value<br />Consumer Group A<br />SYS,SYSTEM …<br />Consumer Group B<br />Priorities<br />DEFAULT_CONSUMER_GROUP<br />Specific Value<br />
  8. 8. Resource Allocation Methods<br />DBA_RSRC_PLAN_DIRECTIVES<br />
  9. 9. Notes<br />The currently active resource plan does not enforce allocation limits until CPU usage is at 100%.<br />When limits are enforced, unused allocation by any consumer group can be used by other consumer groups<br />It is possible for a subplan or consumer group to have more than one parent.<br />No more than 31 resource consumer groups in any active plan<br />At most, a plan can have 31children<br />Plans and resource consumer groups cannot have the same name.<br />
  10. 10. How to Manage<br />Use DBMS_RESOURCE_MANAGER<br />Use EM GUI<br />
  11. 11. Resource Manager in EM<br />Plans: Plan and Plan Directives<br />
  12. 12. Resource Manager by CLI<br />
  13. 13. Create Simple Plan<br />BEGIN DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_PLAN (<br /> SIMPLE_PLAN => 'SIMPLE_PLAN1', CONSUMER_GROUP1 => 'MYGROUP1', GROUP1_PERCENT => 80, <br /> CONSUMER_GROUP2 => 'MYGROUP2', GROUP2_PERCENT => 20); <br />END; / <br />
  14. 14. Create Complex Plan<br />
  15. 15. Complex Plan<br />via Oracle® Database Administrator's Guide<br />11g Release 2 (11.2)<br />
  16. 16. Complex Plan<br />
  17. 17. Privileges<br />BEGIN DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP (<br /> GRANTEE_NAME => 'KAMUS',<br /> CONSUMER_GROUP => 'SYS_GROUP',<br /> GRANT_OPTION => TRUE);<br />END;<br />/<br />BEGIN DBMS_RESOURCE_MANAGER_PRIVS.REVOKE_SWITCH_CONSUMER_GROUP (<br /> REVOKEE_NAME => 'KAMUS', <br /> CONSUMER_GROUP => 'SYS_GROUP');<br />END;<br />/<br />
  18. 18. How to Enable/Disiable<br />Manually<br />By default the Resource Manager is not enabled<br />ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = 'mydb_plan';<br />DBMS_RESOURCE_MANAGER.SWITCH_PLAN<br />By using Scheduler Windows<br />Enable: By Oracle Scheduler<br />Disable: ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = 'FORCE:mydb_plan';<br />
  19. 19. Switch Consumer Group<br />
  20. 20. Views about RSRC<br />DBA_RSRC_CONSUMER_GROUP_PRIVS<br />DBA_RSRC_PLANS<br />V$RSRC_PLAN<br />V$RSRC_CONSUMER_GROUP<br />V$SESSION. RESOURCE_CONSUMER_GROUP<br />V$RSRC_SESSION_INFO<br />DBA_HIST_RSRC_*<br />
  21. 21. Oracle Schedule<br />Kamus@ACOUG<br />
  22. 22. Automated Maintenance Tasks<br />Scheduler Windows<br />DBMS_SCHEDULER.CREATE_WINDOW<br />Resource Plan<br />DEFAULT_MAINTENANCE_PLAN<br />

×