10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7 RESOURCE MANAGEMENTSQL> alter system set resource_manager_plan=’myplan’;A database’s resource plan may be changed at any time, allowing you to reallocateresources at various times of the day, week, or month in order to meet the varyingworkload requirements of your business. When the resource plan is activated, noresources are allocated to individual user sessions. Instead, resources are allocatedto the consumer groups according to the directives in the resource plan.Consumer GroupsWhen a resource plan is activated, DBRM examines key attributes of all sessions in the database andassigns them to consumer groups. Sessions are assigned to consumer groups by means of mapping rulesthat you define. For example, a set of user accounts can be mapped to a consumer group based on theiruser name or the machine from which they are logging in. A user may belong to many differentconsumer groups and may be dynamically reassigned from one consumer group to another even in themiddle of executing a SQL statement or query. Since database resources are allocated only to consumergroups, reassigning a session to another group immediately changes its resource allocation. All sessionsin a consumer group share the resources of that group. For example, if the APPS consumer group isallocated 70% of the total CPU on the server, all sessions belonging to that consumer group will equallyshare the 70% allocation of CPU. There are two built-in consumer groups in every database: SYS_GROUPand OTHER_GROUPS. These groups cannot be modified or dropped.SYS_GROUP: This is the default consumer group for the SYS and SYSTEM useraccounts. These accounts may be assigned to another consumer group usingmapping rules we’ll discuss in the next section.OTHER_GROUPS: This is the default consumer group. Any sessions that belong to aconsumer group that is not defined in the currently active resource plan willautomatically be mapped to this consumer group. This is <strong>Oracle</strong>’s way of makingsure all user sessions are assigned to a consumer group in the active resource plan. Note: We would have preferred a name like OTHER for that last consumer group, but yes, it really is named“OTHER_GROUPS,” not OTHER_GROUP, or OTHER. We must have been out of town when Larry called to ask ouropinion on this one.Consumer Group Mapping RulesAll user sessions (except SYS and SYSTEM) are mapped by default to the consumer group OTHER_GROUPS.This behavior can be modified using mapping rules so that sessions are automatically reassigned toother consumer groups. If there is no mapping rule for a session, or if the mapping rules assign thesession to a consumer group that is not named in the currently active plan, then it will be automaticallyassigned to this built-in consumer group. Every resource plan must have the OTHER_GROUPS resourcegroup to handle this condition. The following example shows how a mapping rule is created. Thismapping rule calls for the TPODER account to be automatically assigned to the REPORTS consumer group,while anyone logging in using the Payroll.exe application will be mapped to the APPS consumer group:178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!