Thursday, February 28, 2019

All you want to know about CDBs , PDBs and multitenant databases


Why should We use multitenant databases? 

  • Rapid provisioning (Via clones)
  • Online PDB relocate (using DB link)
  • Sharing background process
  • Sharing SGA
  • Minimize Capex and Opex 
  • Single Backup for CDB
  • Automatically Standby
  • Perform rapid upgrades
  • Reference data in a different CDB
  • Isolate grants within PDBs
  • Refreshable clone - read-only clone that can periodically synchronize with its source PDB
  • Snapshot copy PDB - this PDB cannot be unplugged from the CDB root or application root


  • CDB -> container database -> DBA point of view 
  • PDB -> pluggable database -> Application point of view 
  • Many PDBs can be plugged into a single Multitenant CDB.

  • The system container includes the root CDB and all PDBs in the CDB
  • An application container consists of exactly one application root, and the PDBs plugged into this root.
  • If a PDB belongs to an application container, then it is an application PDB. An application seed is an optional application PDB.

  • A CDB administrator manages the CDB itself.
  • An application container administrator manages the application container
  • An application PDB administrator manages the PDB's within the application container
  • A PDB administrator manages PDB outside the container 

How Hot clones works? 
  • Apply redo to catchup the source and apply undo to rollback uncommitted transactions.        

Seed -> system,sysaux,temp,undo


CDB$ROOT (oracle system Metadata only - Exactly one) -> PDB$SEED (template - cannot drop), PDB's 

- SYS is a common user in the CDB. Every PDB is owned by SYS.
- By default, a user connected to one PDB must use database links to access objects in a different PDB
To open the PDB, you must start the respective service. 
- To stop the PDB, ALTER PLUGGABLE DATABASE PDB_NAME CLOSE IMMEDIATE;

  

COL NAME FORMAT A15
show conn_name
SELECT NAME, CON_ID, DBID, CON_UID, GUID FROM V$CONTAINERS ORDER BY CON_ID;
select con_id,username,default_tablespace,common from cdb_users;
Select PDB_NAME from DBA_PDBS;


PDB/CDB new features (12.2, 18c, 19c) 





No comments:

Post a Comment