Table Space Management   «Prev  Next»

Lesson 6Database Resource Manager
ObjectiveDescribe Database Resource Manager, its workload policies, and its relationship to maintenance windows in Oracle 26ai.

Database Resource Manager in Oracle 26ai

Oracle AI Database Resource Manager controls how competing database workloads share available resources. It lets a DBA express priorities and limits for interactive requests, reports, batch processing, and other work that runs in the same environment.

Consider a shopping application whose checkout requests share a database with management reports. A large report can consume resources needed by many short transactions. Resource Manager provides a way to favor the interactive workload during contention while still allowing reports to progress and use spare capacity.

The policy can include CPU allocation, concurrency limits, parallel execution controls, per-session PGA limits, and responses to excessive resource use. These controls solve different problems. Resource Manager does not add hardware capacity or make inefficient SQL efficient; it governs how workloads compete for the capacity that exists.

This lesson introduces the components and explains an illustrative policy within an application pluggable database (PDB). Plan creation is covered in the next lesson. The SQL shown here inspects configuration rather than changing a running workload policy.

Plans, Directives, and Consumer Groups

A resource plan brings together the policy for a management scope. Its plan directives associate the plan with consumer groups and specify the allocations, limits, and actions that apply. A consumer group represents sessions with similar processing requirements.

For example, an interactive group might receive favorable CPU treatment, while a reporting group has a lower allocation and a concurrency limit. The group identifies the workload; the directive describes how the active plan treats it. The same group can therefore receive different treatment under different plans.

Oracle 26ai Resource Manager within a PDB: an active plan contains directives governing consumer groups, with sessions mapped by workload attributes.
Within a PDB, plan directives govern consumer groups. Sessions receive the policy associated with their current group; OTHER_GROUPS provides fallback coverage.

The figure separates the active plan, its directives, and the groups whose sessions consume resources. These are organizational layers, not three CPU scheduling priority levels. The interactive and reporting directives can apply different controls even though they belong to the same plan.

Administrators maintain these definitions through DBMS_RESOURCE_MANAGER. Creating a definition does not automatically activate it or place application sessions in the intended groups. The RESOURCE_MANAGER_PLAN initialization parameter selects the applicable plan, and Scheduler windows can also influence which plan becomes active.

How Sessions Receive a Policy

Resource Manager supports mapping sessions through attributes such as database user, service, and application module. Mapping rules and their priorities determine which classification applies. A session has one current consumer group at a time, but its group can change through authorized actions or configured switching rules.

In the first diagram, sessions A and C both connect as APP_USER. Different services or module attributes can place one in OLTP_GROUP and the other in REPORTING_GROUP. A database username alone does not have to define the workload boundary.

This is useful when an application uses a shared account or connection pool. Classification should reflect the work being performed, with reliable application attributes and tested mapping rules. Otherwise, a carefully designed reporting limit may have little effect because the reporting sessions never enter the reporting group.

The top plan must provide OTHER_GROUPS coverage. This is the fallback policy for sessions whose current consumer groups are not represented in that plan. It should not be understood merely as a list of users who have never been assigned a group. Even an existing, valid group can need fallback treatment when a different plan becomes active.

Distinguish the Resource Controls

Controls address different dimensions of workload behavior
ControlPurposeImportant distinction
CPU allocationDetermines relative treatment when workloads compete for CPU.An allocation is not necessarily a hard utilization ceiling.
Utilization limitPlaces a configured ceiling on CPU utilization.Can constrain use even when spare allocation exists elsewhere.
Active-session poolLimits sessions with active calls and queues additional work.Does not simply count every logged-in connection.
Degree of parallelism limitBounds parallelism within an operation.Does not limit the number of concurrent application sessions.
Parallel execution policiesManage parallel server use and parallel statement queues.Have their own configuration requirements beyond a DOP limit.
Per-session PGA limitRestricts an individual session's PGA consumption.Is not an SGA setting or a shared group-wide memory allowance.
Resource thresholds and actionsRespond to specified excessive resource use.CPU time, elapsed time, and I/O thresholds measure different things.

Relevant directive parameters include ACTIVE_SESS_POOL_P1, PARALLEL_DEGREE_LIMIT_P1, SESSION_PGA_LIMIT, and UTILIZATION_LIMIT. Naming the parameter helps connect the conceptual policy to its later implementation, but its value should come from workload requirements.

For threshold-based policies, a configured action can switch consumer groups, cancel the current SQL call, or terminate a session. These outcomes are not interchangeable. A report that can tolerate slower execution may be suitable for switching; an application that depends on session state may be affected very differently by termination.

Do not treat an I/O threshold that triggers an action as a guaranteed storage-bandwidth allocation. Storage resource management capabilities depend on the platform and configuration. Likewise, limiting DOP does not, by itself, establish every parallel statement queuing behavior.

Multitenant Resource Management

A CDB resource plan allocates resources among PDBs. Within an application PDB, a PDB resource plan allocates the PDB's available resources among consumer groups. These are distinct administrative levels, with related enforcement requirements.

A PDB's CPU allocation percentages should not be read as guaranteed percentages of the entire physical server. The PDB itself participates in the broader allocation among databases and PDBs. Some PDB policies depend on resource management at the CDB level.

PDB resource plans cannot contain subplans or use multilevel scheduling policies. Although the general Resource Manager model includes subplans in supported contexts, the application-PDB examples in this lesson use a single-level policy. A diagram with three rows does not imply a three-level scheduling hierarchy.

Example: An E-Commerce Resource Plan

Suppose web requests and management reports share one application PDB. The illustrated ESALES_PLAN favors web requests during CPU contention, limits reporting concurrency, and provides fallback coverage.

ESALES_PLAN percentage-style example: WEBUSER receives MGMT_P1 70, MANAGER 20, and OTHER_GROUPS 10, with separate active-session and DOP limits.
Illustrative level-1 CPU allocations under contention: 70% web, 20% reporting, and 10% fallback. These are not hard CPU caps; unused capacity can serve other groups.
Settings shown in the example
Consumer groupCPU allocationActive-session settingDOP limit
WEBUSERMGMT_P1 = 70No explicit cap in this directive1, serial
MANAGERMGMT_P1 = 2044
OTHER_GROUPSMGMT_P1 = 10No setting shownNo setting shown

WEBUSER and MANAGER are consumer-group names here. They are not automatically database usernames. Application sessions must be classified into the appropriate groups for these directives to govern their work.

The image's fallback phrase, “sessions not otherwise assigned,” is shorthand. More precisely, the OTHER_GROUPS directive covers sessions whose current consumer groups are not represented in the active plan.

CPU Allocations Are Not Hard Caps

The 70/20/10 values describe the example's level-1 percentage-style allocation under contention. If reporting does not use its allocation, other work can use available CPU, subject to applicable limits. The diagram does not configure a separate utilization ceiling.

Consequently, observing the web workload above 70% at a quiet reporting time does not automatically indicate failure of the policy. Evaluate whether the intended treatment occurs when workloads actually compete. Nor does the 70% allocation guarantee a particular checkout response time.

Concurrency Is Different from Parallelism

The reporting active-session limit permits four sessions with active calls under that directive; additional work can queue. DOP four limits parallelism per operation. Multiplying these numbers does not establish a universal sixteen-process budget, because parallel execution structure and server use require separate consideration.

Web operations are illustrated as serial, with no explicit active-session cap in this directive. That is not a promise of unlimited database capacity. CPU, memory, connection limits, and other policies still constrain the workload.

Percentage-Style Examples and SHARES

The figure deliberately uses MGMT_P1 to show a percentage-style policy. Oracle's 26ai package documentation recommends SHARES instead of MGMT_P* when defining new configurations. Shares express relative weights rather than fixed reservations.

Retain the distinction when moving from a teaching example to implementation. MGMT_P1 remains documented and should not be confused with the older deprecated CPU_P1 parameter. The next lesson can apply the recommended configuration approach while preserving the business objective shown here.

CPU Management Scope in Oracle 26ai

Oracle 26ai introduces RESOURCE_MANAGER_CPU_SCOPE to select between instance-level CPU management and supported server-level inter-instance management:

SERVER_WIDE is not supported on ordinary non-Exadata Linux systems. The documented requirements include UEK 5 or later. Defaults depend on deployment: INSTANCE_ONLY is the general reference default, while Autonomous is configured with SERVER_WIDE by default.

This parameter is not dynamically modifiable and cannot be changed within a PDB. In RAC, the same value is required across instances. Server-wide describes management on the server, not one global CPU scheduler spanning every cluster node. Consult the platform requirements before treating this feature as an option for a particular installation.

Resource Plans and Routine Maintenance

Maintenance work also competes with application workloads. Tasks such as automatic optimizer statistics collection and advisor activity need opportunities to run without overwhelming business activity. Scheduling and resource allocation address two different questions: when work is eligible to run, and how it competes while running.

Maintenance Windows

A Scheduler window defines a scheduled time interval and can specify a resource plan. A job can explicitly use a window or window group as its schedule. Automated maintenance clients also have their own enabling and scheduling behavior; opening a window does not start every job in the database.

Oracle documents seven predefined maintenance windows in MAINTENANCE_WINDOW_GROUP. These defaults replace the old two-window description:

Documented default maintenance windows
WindowsStartDuration
MONDAY_WINDOW through FRIDAY_WINDOW22:00 on the named day4 hours, ending at 02:00 the next day
SATURDAY_WINDOW06:00 Saturday20 hours
SUNDAY_WINDOW06:00 Sunday20 hours

These are documented defaults, not a report of the configuration in your database. Existing installations may have different calendars, enabled states, or plan assignments. Inspect the schedule and its time-zone context rather than interpreting the times in your workstation's local zone automatically.

Inspect the Actual Windows

Using an administrative session with appropriate catalog access in the intended container, inspect the current configuration:

-- SQL*Plus commands:
SHOW CON_NAME
SHOW PARAMETER resource_manager_plan

SELECT window_name, enabled, active, repeat_interval,
       duration, resource_plan, next_start_date
FROM dba_scheduler_windows
ORDER BY window_name;

SELECT window_group_name, window_name
FROM dba_scheduler_wingroup_members
WHERE window_group_name = 'MAINTENANCE_WINDOW_GROUP'
ORDER BY window_name;

The first commands establish container and plan context. The queries then show window definitions and actual group membership. Review NEXT_START_DATE alongside the calendaring expression to understand when the next opening is expected.

Duration and Plan Changes

A window's repeat interval controls recurrence; its duration controls how long it stays open. Moving a start time does not automatically change duration. Also, do not assume that every ordinary Scheduler job must stop when its window closes; job behavior depends on its settings.

DBMS_SCHEDULER.SET_ATTRIBUTE supports changes to window attributes. Follow the documented disable, change, and enable procedure for the intended operation. Record the original settings and work with an inactive window before altering a production maintenance schedule.

A window with an assigned resource plan can activate that plan, and Scheduler normally restores the preceding plan when the window closes. Forced plan settings and intervening administrative changes affect this behavior. Check the configuration rather than assuming a custom application plan will always be replaced and restored automatically.

Changing maintenance policy also requires checking task completion. A plan that protects application response time but repeatedly leaves essential maintenance unfinished needs adjustment. Likewise, a longer window does not by itself provide more CPU if the active policy severely constrains its work.

Verify Definitions, Classification, and Runtime Behavior

Use DBA_RSRC_PLANS and DBA_RSRC_PLAN_DIRECTIVES to inspect stored definitions. Use V$RSRC_PLAN for runtime plan information and V$SESSION.RESOURCE_CONSUMER_GROUP to examine current session classification. A plan appearing in a definition view is not proof that it is active.

Verification should follow the policy's intended effect. Confirm the right plan is active in the right container, check that representative sessions enter the expected groups, and then examine queueing and workload results. A reporting session placed in the wrong group can make a valid directive appear ineffective.

For the e-commerce example, assess checkout response times alongside report completion times during representative simultaneous load. If CPU is not the bottleneck, changing CPU weights may have little effect. If reports wait in an active-session queue, that may be the intended result of the concurrency policy rather than an unexplained slowdown.

Begin with a small number of business-relevant groups and policies that can be explained and tested. Add controls when measurements show a specific need. A simpler plan is easier to validate than one with overlapping mappings and thresholds whose effects are difficult to distinguish.

Before implementation, document the workload objective, classification rule, intended resource treatment, and acceptance criteria for each group. Keep a record of the previous plan and its activation method so that later administrative work remains understandable.

Oracle Documentation

Database Resource Manager - Exercise

Practice defining workload groups and their resource policies in the Database Resource Manager - Exercise.

In the next lesson, you will learn how to create a plan in the database.


SEMrush Software 6 SEMrush Banner 6