Oracle10g DRM - Procedure to implement and manage
To administer the DRM, Oracle has provided many procedures
available through the package dbms_resource_manager. This section
gives a brief overview of the steps involved in implementing the
database resource management.
To create a simple (single level) resource plan with specified
allocation methods, you'll typically use create_simple_plan and
assign resource groups.
In order to create a complex or multi-level plan, you will
follow these stages.
- Create a Pending Area for creating plan schemas (use the
procedure create_pending_area).
- Create Resource Plans (use the procedure create_plan).
- Create Consumer Resource Groups (use the procedure
create_consumer_group).
- Specify the Resource Plan directives (use the procedure
create_plan_directive).
Once the resource plans and resource consumer groups are
defined and validated, they are submitted to make them active.
Before you begin using the DRM facility, resource groups have
to be assigned to the users (or schemas). In earlier versions,
until the 9i release, the consumer resource groups were manually
assigned users. It was also possible to switch a user session to
another resource group by using the procedures available in the
dbms_resource_manager package. These procedures are as follows:
- The user’s initial consumer group is automatically set to
default_consumer_group when the user is created.
- You can use set_initial_consumer_group procedure to switch
to a specific consumer group.
- Use the switch_current_consumer_group change the current
resource consumer group of a user’s current session.
- The procedure switch_consummer_group_for_sess causes the
specified session to immediately be moved into the specified
resource consumer group.
- switch_consumer_group_for_user can be used to change the
resource consumer group for all sessions with a given user name.
Now, with the release of 10g, you have more options in
assigning the resource groups to the sessions. We will examine
these new features in the next section. |