Chapter 13 · Multitenant Architecture: CDBs, PDBs, Services, Cloning, and Lifecycle
Patch, Upgrade, Backup, Recovery, and Monitoring Considerations in Multitenant Deployments
Apply container scope to patching, datapatch, upgrades, RMAN backup/PITR, service availability, and monitoring so every PDB has lifecycle evidence rather than assuming one CDB-level action automatically completed every tenant.
Learning outcomes
A CDB maintenance window finishes, the root reports the new
binary home, and most PDBs reconnect. One PDB had been closed
during datapatch and still reports old SQL patch
state. Separately, a tenant asks for recovery to yesterday
without affecting other PDBs. Multitenant reduces some recovery
blast radius but multiplies lifecycle orchestration: each PDB
needs patch, backup, recovery, service, and monitoring evidence.
Separate Oracle-home binary patching from datapatch SQL actions and verify patch state per relevant container.
Explain how PDB open state influences datapatch coverage and why closed PDBs require follow-up.
Design RMAN CDB/PDB backup evidence and PDB PITR with exact close/backup/undo/resetlogs prerequisites.
Use CON_ID/service/PDB views to monitor availability instead of treating root health as tenant health.
Explain why Free is suitable for recovery learning but not a patching-maintenance simulation because Oracle supplies no patches/SRs for Free.
Mandatory work targets Oracle AI Database Free 26ai, reviewed against RU 23.26.3, SQL Developer 26.2, and SQLcl 26.2.1. The August 2026 Licensing Information manual lists Oracle Multitenant as included in Free with a maximum of 16 PDBs, although the practical number can be lower because Free is capped at 2 foreground CPU cores, 2 GB RAM, and 12 GB user data. Free permits one installation per logical environment and receives no Oracle patches or Support service requests. The course baseline CDB is FREE and the default application PDB/service is FREEPDB1. Administrative PDB lifecycle commands require root/PDB-specific administrative privileges; application SQL remains in FREEPDB1 or an explicitly created disposable PDB.
1. Binary patching and SQL patching have different scope
Oracle home patching updates database software binaries used by
the CDB/instance. datapatch then executes SQL
changes needed inside the database dictionaries. In multitenant,
Oracle recommends opening all relevant PDBs and running
datapatch across them together; datapatch acts on the CDB and
opened PDBs. A closed PDB can therefore need a later open plus
datapatch run.
SELECT banner_fullFROM v$versionWHERE banner_full LIKE 'Oracle%';SELECT con_id,name,open_modeFROM v$containersORDER BY con_id;SELECT patch_id, patch_type, action, status, action_time, source_version, target_versionFROM dba_registry_sqlpatchORDER BY action_time DESC,patch_id;
DBA_REGISTRY_SQLPATCH records datapatch attempts in
the current container/database dictionary context. For a
PDB-level check, connect/switch to that PDB and query it there
rather than assuming a root query represents every closed
tenant's SQL state.
2. Current 26ai patch workflow opens PDBs and validates datapatch
sqlplus / as sysdbaALTER PLUGGABLE DATABASE ALL OPEN;HOST $ORACLE_HOME/OPatch/datapatch -sanity_checksHOST $ORACLE_HOME/OPatch/datapatch -verboseSELECT patch_id,action,status,action_timeFROM dba_registry_sqlpatchORDER BY action_time DESC;
Oracle recommends datapatch -sanity_checks before
the verbose run. Tool invocation and Oracle-home paths vary by
OS and installation; on Windows use the corresponding
environment/command syntax.
Oracle AI Database Free receives no Oracle patches, including security patches, and cannot open Oracle Support service requests. Use the current Free image/RU for learning; do not present an in-place quarterly Free patch drill as supported production maintenance.
3. Upgrades also have root/PDB compatibility and post-action scope
Upgrading the CDB software/dictionary does not remove PDB-level
checks. AutoUpgrade/unplug-plug/replay workflows validate PDB
components, open state, invalid objects, compatibility, and
post-upgrade fixups. Plugging an older/mismatched PDB can
produce PDB_PLUG_IN_VIOLATIONS that require upgrade
or datapatch actions before normal service.
SELECT pdb_name,statusFROM dba_pdbsORDER BY pdb_id;SELECT comp_id,comp_name,version_full,statusFROM dba_registryORDER BY comp_id;SELECT owner,object_type,COUNT(*) AS invalid_objectsFROM dba_objectsWHERE status='INVALID'GROUP BY owner,object_typeORDER BY owner,object_type;
4. RMAN can back up a selected PDB, but recovery planning starts before the incident
Recovery Manager (RMAN) can connect to the CDB/root and back up one or more PDBs. A usable design includes control-file/recovery-catalog strategy, archived redo, root/seed dependencies when required, encryption/keystore access, Fast Recovery Area (FRA) or backup destinations, retention, and restore testing.
rman target /RMAN> SHOW ALL;RMAN> REPORT SCHEMA;RMAN> LIST BACKUP SUMMARY;
RMAN> BACKUP PLUGGABLE DATABASE FREEPDB1 TAG 'SH13_PDB_BASELINE';
A successful backup command is not a recovery test. Validate restore/recovery in a disposable environment and record required root/control/seed/redo artifacts.
5. PDB PITR can rewind one PDB while others remain available
Point-in-time recovery (PITR) of a PDB restores/replays the
selected PDB to an earlier system change number (SCN), time, or
restore point. Other PDBs can remain open. The target PDB must
be closed for the recovery, required backups/redo must exist,
and the recovered PDB is opened with RESETLOGS,
creating a new PDB incarnation.
-- SQL*Plus connected to CDB root:ALTER PLUGGABLE DATABASE FREEPDB1 CLOSE;-- RMAN connected to root as SYSBACKUP/SYSDBA:RUN { SET UNTIL SCN 123456789; RESTORE PLUGGABLE DATABASE FREEPDB1; RECOVER PLUGGABLE DATABASE FREEPDB1;}-- Back in SQL*Plus:ALTER PLUGGABLE DATABASE FREEPDB1 OPEN RESETLOGS;
Replace the example SCN only with a target proven to be inside your recoverable window. In shared-undo mode, PDB PITR can require auxiliary/root/seed backups; local undo makes the operation more self-contained. For recovery to orphan PDB incarnations, current Oracle documentation requires local undo.
6. Deliberately wrong: promise PDB PITR without a restore drill
A runbook saying “RMAN can recover this PDB” proves capability syntax, not recoverability. Missing archived redo, control-file metadata, root/seed backup dependencies, encrypted-wallet keys, FRA space, or a bad target time can invalidate the plan during the incident. The repair is recurring restore testing with measured recovery time/object correctness and a known rollback/escalation path.
7. Monitoring must include container and service state
SELECT con_id,name,open_mode,restrictedFROM v$containersORDER BY con_id;SELECT name,pdb,network_name,enabledFROM v$servicesORDER BY name;SELECT con_id, COUNT(*) AS user_sessionsFROM v$sessionWHERE type='USER'GROUP BY con_idORDER BY con_id;SELECT con_name, state, restrictedFROM dba_pdb_saved_statesORDER BY con_name;
Root OPEN plus listener UP does not
prove every PDB/service is usable. Monitor service registration,
PDB open mode, application probe success, tablespace capacity,
invalid objects, patch/upgrade state, backup age, and
recovery-window evidence per tenant.
8. Lifecycle checklist for many-PDB CDBs
- Inventory: PDB name/GUID/CON_ID, service names, owner, tier, RU/COMPATIBLE/component state.
-
Startup: intended open mode and
DBA_PDB_SAVED_STATES. - Patch: Oracle-home level plus datapatch SUCCESS evidence for every intended PDB.
- Upgrade: plug-in violations, component versions, invalid objects, post-fixups.
- Backup: backup age, archived redo/control metadata, encryption keys, restore validation.
- Recovery: PDB-specific RPO/RTO, PITR prerequisites, RESETLOGS/incarnation implications.
- Monitoring: CON_ID/service/open-mode/storage/session/error signals.
- Rollback: maintenance rollback/recovery path tested before change.
9. Production judgment and chapter bridge
Multitenant centralizes the engine but does not eliminate tenant lifecycle work. Patch binaries once per Oracle home, then prove SQL patch state per PDB. Back up at the correct CDB/PDB scope and rehearse PDB recovery. Keep services/open state in availability monitoring and treat clone/restore as data-governance/security operations as well as technical ones.
Current course baseline remains 26ai RU 23.26.3. PDB PITR
mechanics are available for study without changing
COMPATIBLE; specific
orphan-incarnation/application-PDB scenarios have documented
version/undo prerequisites. Chapter 14 can now build on this
lifecycle model for deeper user/role/privilege and
database-security administration.
Check your understanding
- Why can a closed PDB miss datapatch work?
- What does OPEN RESETLOGS after PDB PITR create?
- Can other PDBs remain open during PITR of one PDB?
- Why is Oracle AI Database Free not a valid quarterly patch-download lab?
- What should multitenant monitoring include besides CDB instance status?
Review the answers
Datapatch applies SQL actions to the CDB and opened PDBs; a closed PDB needs a later open and follow-up datapatch.
It creates a new PDB incarnation after abandoning changes beyond the recovery target.
Yes. Oracle supports recovery of a selected PDB while remaining PDBs stay operational, subject to recovery prerequisites.
Oracle states that Free receives no patches, including security patches, and has no Support SR entitlement.
PDB open mode, service registration, container-specific sessions/storage/errors, patch/upgrade state, application probes, backup age, and recovery evidence.
Authoritative references
- Single-Instance Database Maintenance with OPatch — 26ai datapatch/open-PDB maintenance guidance
- DBA_REGISTRY_SQLPATCH — datapatch apply/rollback status evidence
- Backup and Recovery User's Guide — RMAN CDB/PDB backup and recovery
- PDB Point-in-Time Recovery — PDB PITR prerequisites and RESETLOGS workflow
- Licensing Restrictions for Free — Free runtime/resource restrictions