Resource Manager, Scheduler, and Automated Maintenance Tasks
This domain tests allocating resources with Resource Manager, scheduling work with DBMS_SCHEDULER, and controlling the automatic maintenance clients that run in maintenance windows.
Resource Manager
Changes are made in a pending area: CREATE_PENDING_AREA, create or modify plans, consumer groups, and plan directives, then VALIDATE_PENDING_AREA and SUBMIT_PENDING_AREA. Directives use CPU shares (for example MGMT_P1), UTILIZATION_LIMIT, and PARALLEL_SERVER_LIMIT. Mapping rules assign sessions by service, module, action, or user. The plan is inactive until RESOURCE_MANAGER_PLAN is set. In a CDB, a CDB resource plan allocates shares and limits across PDBs.
Scheduler
DBMS_SCHEDULER manages jobs, programs, schedules, job classes, windows, window groups, and chains. Jobs can use a named program and schedule, a repeat interval, or a calendar expression. Job classes assign logging level, resource consumer group, and service. Windows activate resource plans and can run jobs. Lightweight jobs reduce overhead for very short jobs.
Automated maintenance tasks
Three clients run in maintenance windows: automatic optimizer statistics collection, automatic segment advisor, and automatic SQL tuning advisor. Weeknight windows are typically 22:00-02:00 and weekend windows are longer. Inspect DBA_AUTOTASK_CLIENT, DBA_AUTOTASK_CLIENT_JOB, and DBA_AUTOTASK_WINDOW_CLIENTS; enable or disable with DBMS_AUTO_TASK_ADMIN.ENABLE or DISABLE. In a CDB, check the container where the task is configured.
Worked example
Create a DAYTIME plan with consumer groups OLTP and REPORTING. In the pending area, create the plan, create both groups, and add directives giving OLTP 80 shares and REPORTING 20, with a utilization limit of 50 for REPORTING. Map sessions by service name, validate, submit, then set RESOURCE_MANAGER_PLAN='DAYTIME'. During contention OLTP gets roughly four times the CPU; REPORTING is also capped at 50%.
Traps
Pending-area changes are invisible until submitted. A plan does nothing until activated. Shares matter only under contention; utilization limits always cap. Scheduler jobs do not run unless enabled. Disabling an autotask client does not drop its window or job history.