- Cost reduction in terms of Product licensing and Hardware procurement as we require less number of processors and less memory compare to a Non-CDB environment
- Easier Database maintenance, Pluggable Databases can easily be moved or copied locally or remotely across Physical machines in the network, Upgrading Operating System, Upgrading or Patching Database itself is a lot easier and "often" a one shot process, that greatly improves the availability
- Performance tuning becomes a lot easier as all PDBs in a CDB environment share same Hardware/Platform/Network resources like CPUs/Memory/OS/Bandwidth etc.. For example, It is quite easy to tune one single piece of SGA/PGA on one single instance rather tuning each SGA on each physical machine
- It is completely transparent to Application, there is no specific configuration required to connect to a Database in Multitenant Architecture over a network. It works the same way as it works with Non CDBs. Every Container or PDB has its own Service name to allow connections from Clients like JDBC/ODBC/XA/SQPLUS etc...
- A Multitenant Container Database is created using either DBCA or "CREATE DATABASE" Command
- A Multitenant Container Database or shortly a CDB, can be created with an empty container, no Pluggable Databases or shortly PDB(s) associated with it, [or] with one or more containers(More than one PDB)
- Memory configurable is sum of memory required for all PDBs, is distributed on demand across all PDBs
- A CDB can contain 253 PDBs including the SEED Container
- Starting up and Shutting down a CDB is no different than a Non-CDB except we need to manually mount and dismount associated PDBs
- The Architecture basically consists following containers
- Root container - It is the core of the CDB, contains all Oracle supplied metadata like packages, core dictionary objects, and common users. It is denoted as CDB$ROOT
- SEED Container (SEED PDB) - This is a template database distributed for new PDBs, whenever we create a new PDB, Oracle copies mandatory datafiles (common datafiles) for creation of PDB from this SEED Database. This is by default in READ-ONLY mode, can't be altered or modified. This is denoted as PDB$SEED
- User defined PDB Container (PDB) - This is the Pluggable Database created for Application purpose, contains only Consumer Data or USER Data
- CDB has common user environment. A User exists in the ROOT Container can login to any PDB with the privileges given. A CDB also has local users exclusive to PDBs. A Common user and role name must start with C## or c## and consists only of ASCII characters.
- If a common user is required to login to a container, "c##" must be supplied as suffix. For example, If a common user "PDBADMIN" has privilege to acces a container PDB, We need to use it as "C##PDBADMIN" in order to login successfully to container PDB
- "CONTAINER=ALL" clause can be used on root container while performing different tasks such as "ALTER SYSTEM", "ALTER DATABASE", "ALTER USER" etc.. This clause sets the specific action or configuration to all available PDBs, as well as future PDBs
- Control files, REDO Logs, and UNDO files are owned by ROOT Container as these Database files are Instance specific. Every PDB has its own set of SYSTEM/SYSAUX/TEMP tablespaces, and also includes the Sample User data such as SCOTT, HR etc..
- ENABLE_PLUGGABE_DATABASE initialization parameter specifies If a particular Database is CDB or Non-CDB
- By default Oracle instance mounts the Pluggable Database, so it has to be manually opened into READ/WRITE Mode. In case of Cluster, it has to be opened in each instance
For multiple PDBs,
SQL> ALTER PLUGGABLE DATABASE PDB,PDB1,SALESPDB OPEN;
Pluggable database altered.
SQL> ALTER PLUGGABLE DATABASE PDB,PDB1,SALESPDB CLOSE;
Pluggable database altered.
NAME OPEN_MODE TOTAL_SIZE/1024/1024/1024
------------------------------ ---------- -------------------------
PDB$SEED READ ONLY .263671875
PDB READ WRITE .424804688
SALESPDB MOUNTED 0
To set an initialization Parameter,
A Parameter can be set exclusive to a PDB, or for all current and future PDBs using "ALTER SYSTEM" command.
On the root container:
SQL> ALTER SYSTEM SET RESOURCE_LIMIT=TRUE CONTAINER=ALL;
On a specific container or PDB:
SQL> ALTER SYSTEM SET RESOURCE_LIMIT=TRUE;
- A Common user and role name must start with C## or c## and consists only of ASCII characters.
- To login to a specific PDB, A Common user must have CREATE SESSION Privilege on the PDB.
Hope it helps. I will write more posts on 12c Database in coming weeks and publish, Please stay tuned, add me to you G+ Circles!! Your feedback always helps me and motivates me to blog more, please leave your valuable comment that is always a pleasure to read.