Thursday, 15 December 2016

Oracle Multitenant Architecture



The Multitenant Architecture enables an Oracle database to function as a multitenant container database (CDB).
A CDB includes zero, one, or many customer-created pluggable databases (PDBs). A PDB is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB. All Oracle databases before Oracle Database 12c were non-CDBs.

In this we will see about the components of CDB. In this I have simplified the components functionality.

CDB$ROOT:
 This particular container contains Oracle metadata. May be few limited user data as well. There can be only one CDB$ROOT for the CDB.

PDB$SEED:
 This doesn't contains the user data but for creating the PDB template. One PDB$SEED will be there for per CDB.

PDB:
 This PDB contains the user data and user metadata. We can have many PDB in single CDB. 



Image result for oracle multitenant architecture diagram 

* Each of the CDB, PDB$SEED, PDB is called the container. Each container has unique Container ID (CON_ID), Container name and each PDB has global unique identifier. 

* PDB's SYSTEM tablespace contains user metadata. The oracle metadata won't be stored in each PDB's.

* Oracle metadata will be storing in a central location for all the PDB's.

* Oracle metadata will have a pointer which is stored in the ROOT CDB. So each PDB will be having an access to metadata without duplicating it to other PDB's.

* CDB has similar files and and Background processes same as Non-CDB databases. Some of the files are common for both CDB and PDBs. Some are not shared between them.

Common Files:

* BG processes: There is a single set of BG processes for the CDB. The PDB don't have any separate background processes attached to it.

* Redo-Log files: These are common for the entire CDB. Each of the PDB's changes will be tracked with the corresponding change number in the archived log. There will be only one redolog for the non-RAC instance. Each instance will be having an redolog if in case of RAC.

* Memory: We allocate the memory only for the CDB because all we need only one CDB for the entire multitenant architecture.

* Controlfiles: The controlfile will have all teh information about all the PDB's.

* Metadata: Oracle metadata will be shared among all the PDB's.

* Temp Tablespace: There is common temp tablespace for all the CDB and ROOT node. Each PDB has their own temp tablespace for its users.

* Undo: All PDB's uses same Undo tablespace. Each PDB will have one active Undo TBS.

Exclusive for PDBs:

* The tablespace or the application which we created for the application PDB, will not be shared among the other PDB' or teh central CDB.

* Temp Tablespace
* Local database users
* Local user Metadata
* Resource Manager Plan




Cheers..!!
Happy Learning..!!





No comments:

Post a Comment