Oracle Database — Multitenant Architecture, Create CDB and PDB

Oracle Database 19.3c— Multitenant Architecture, Create CDB and PDB

In the previous story, we covered how to install oracle 19.3c on CentOS 7 (https://kalanaejayasuriya.medium.com/install-oracle-database-19-3c-on-centos-7-52036876436). In this part, we will cover the installation of CDB and PDB. Before beginning installation, let’s talk about what is CDB and PDB.

Multitenant Architecture

  • After Oracle 12c, Oracle came up with new architecture called “Multitenant Architecture.”
  • In previous versions of Oracle database versions, the main problem was, if the user starts a new instance there are particular background processes for each instance. This process is a kind of memory-wasting thing and affects the system performance badly.
  • Therefore, Oracle came up with the new idea to connect different databases into one database technique. That idea is called “Multitenant Architecture.”
  • That one main database is called “CDB” (Container Database) and other databases which are used to connect the main database called “PDB” (Pluggable Database)
(Multitenant Architecture Example)

Main components of Multitenant Architecture

  1. CDB — Container Database
  • This is the mother container (main container).
  • “Control files” and “Redo log files” are the main files of the CDB.

2. CDB$Root — Root Container

  • Every CDB has one root container (CDB$Root).
  • All Pluggable databases (PDBs) control and manage by root container.
  • All PDBs belong to root container.
  • Root container does not store user data.

3. PDB — Pluggable Database

  • There can be connect one or more PDBs to the container database.
  • This is a separate database that creates by a user or creates for a user to store particular data.
  • We can store data in PDBs that can support particular applications.

4. PDB$SEED — Seed Container

  • This is a system-supplied template
  • This template can use to create new PDBs.
  • We cannot add or modify objects in Seed Container (PDB$SEED).

Benefits of Multitenant Architecture

  • Can combine many databases at once
  • Patches and upgrades can apply easily to CDB
  • PDBs can unplug from one CDB and can connect to another CDB.
  • Can manage many databases at once.

Create CDB with PDB — Installation Guide

Step 1 -: 1. In the first step, you have to run “dbca” wizard which is located in Home/database/bin.

Step 2 -: But you cannot run wizard directly. Therefore, you have to use terminal for that. Do same as me. Open terminal and type this

Step 3 -: Then the wizard will open within few seconds and it will look like this. This is our first time. Therefore, select “Create a database.”

Step 4 -: Select advance configuration to set only CDB and PDB manually.

Step 5 -: The ext step is very important. In here we have to set CDB and PDB names. In my case, I have set my name (kalana) as CDB name and “PDBTEST” as a pluggable database name.

Step 6 -: Then follow my steps until we come up with listener part.

Step 7 -: normally, everyone always creates during installation but let us try to configure the listener manually by setting different port number. Therefore, uncheck the “Create a new listener.”

Step 8 -: Again, follow my step until we met setting database credentials

Step 8 -: when setting the password, select “Use same administrative password for all accounts” and type any password which you can remember.

Step 9 -: then do the same as me and finish the installation.

Now you can start your instance and check whether newly created PDB was connected to the system. For that, open the terminal and run “sqlplus / as sysdba”. After that sqlplus will open and type “startup” to start the instance. Then type “show pdbs” to view pdb list that has already been created.

To shutdown the instance type “shutdown immediate” and enter. And, to exit from sqlplus type “exit” or “exit()” to logout from sqlplus.

We did not create a listener in this tutorial. I will teach you how to create custom listener and register PDB with that listener in next tutorial. Thank you!

  1. Part 3 — Oracle Database — Create custom Listener and register it to a PDB in Oracle Database 19.3c -: https://kalanaejayasuriya.medium.com/create-custom-listener-and-register-it-to-a-pdb-f6c709d23054


Oracle Database — Multitenant Architecture, Create CDB and PDB was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Kalana Eranda Jayasuriya

Oracle Database 19.3c— Multitenant Architecture, Create CDB and PDB

In the previous story, we covered how to install oracle 19.3c on CentOS 7 (https://kalanaejayasuriya.medium.com/install-oracle-database-19-3c-on-centos-7-52036876436). In this part, we will cover the installation of CDB and PDB. Before beginning installation, let's talk about what is CDB and PDB.

Multitenant Architecture

  • After Oracle 12c, Oracle came up with new architecture called “Multitenant Architecture.”
  • In previous versions of Oracle database versions, the main problem was, if the user starts a new instance there are particular background processes for each instance. This process is a kind of memory-wasting thing and affects the system performance badly.
  • Therefore, Oracle came up with the new idea to connect different databases into one database technique. That idea is called “Multitenant Architecture.”
  • That one main database is called “CDB” (Container Database) and other databases which are used to connect the main database called “PDB” (Pluggable Database)
(Multitenant Architecture Example)

Main components of Multitenant Architecture

  1. CDB — Container Database
  • This is the mother container (main container).
  • “Control files” and “Redo log files” are the main files of the CDB.

2. CDB$Root — Root Container

  • Every CDB has one root container (CDB$Root).
  • All Pluggable databases (PDBs) control and manage by root container.
  • All PDBs belong to root container.
  • Root container does not store user data.

3. PDB — Pluggable Database

  • There can be connect one or more PDBs to the container database.
  • This is a separate database that creates by a user or creates for a user to store particular data.
  • We can store data in PDBs that can support particular applications.

4. PDB$SEED — Seed Container

  • This is a system-supplied template
  • This template can use to create new PDBs.
  • We cannot add or modify objects in Seed Container (PDB$SEED).

Benefits of Multitenant Architecture

  • Can combine many databases at once
  • Patches and upgrades can apply easily to CDB
  • PDBs can unplug from one CDB and can connect to another CDB.
  • Can manage many databases at once.

Create CDB with PDB — Installation Guide

Step 1 -: 1. In the first step, you have to run “dbca” wizard which is located in Home/database/bin.

Step 2 -: But you cannot run wizard directly. Therefore, you have to use terminal for that. Do same as me. Open terminal and type this

Step 3 -: Then the wizard will open within few seconds and it will look like this. This is our first time. Therefore, select “Create a database.”

Step 4 -: Select advance configuration to set only CDB and PDB manually.

Step 5 -: The ext step is very important. In here we have to set CDB and PDB names. In my case, I have set my name (kalana) as CDB name and “PDBTEST” as a pluggable database name.

Step 6 -: Then follow my steps until we come up with listener part.

Step 7 -: normally, everyone always creates during installation but let us try to configure the listener manually by setting different port number. Therefore, uncheck the “Create a new listener.”

Step 8 -: Again, follow my step until we met setting database credentials

Step 8 -: when setting the password, select “Use same administrative password for all accounts” and type any password which you can remember.

Step 9 -: then do the same as me and finish the installation.

Now you can start your instance and check whether newly created PDB was connected to the system. For that, open the terminal and run “sqlplus / as sysdba”. After that sqlplus will open and type “startup” to start the instance. Then type “show pdbs” to view pdb list that has already been created.

To shutdown the instance type “shutdown immediate” and enter. And, to exit from sqlplus type “exit” or “exit()” to logout from sqlplus.

We did not create a listener in this tutorial. I will teach you how to create custom listener and register PDB with that listener in next tutorial. Thank you!

  1. Part 3 — Oracle Database — Create custom Listener and register it to a PDB in Oracle Database 19.3c -: https://kalanaejayasuriya.medium.com/create-custom-listener-and-register-it-to-a-pdb-f6c709d23054

Oracle Database — Multitenant Architecture, Create CDB and PDB was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Kalana Eranda Jayasuriya


Print Share Comment Cite Upload Translate Updates
APA

Kalana Eranda Jayasuriya | Sciencx (2021-08-09T03:10:11+00:00) Oracle Database — Multitenant Architecture, Create CDB and PDB. Retrieved from https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/

MLA
" » Oracle Database — Multitenant Architecture, Create CDB and PDB." Kalana Eranda Jayasuriya | Sciencx - Monday August 9, 2021, https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/
HARVARD
Kalana Eranda Jayasuriya | Sciencx Monday August 9, 2021 » Oracle Database — Multitenant Architecture, Create CDB and PDB., viewed ,<https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/>
VANCOUVER
Kalana Eranda Jayasuriya | Sciencx - » Oracle Database — Multitenant Architecture, Create CDB and PDB. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/
CHICAGO
" » Oracle Database — Multitenant Architecture, Create CDB and PDB." Kalana Eranda Jayasuriya | Sciencx - Accessed . https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/
IEEE
" » Oracle Database — Multitenant Architecture, Create CDB and PDB." Kalana Eranda Jayasuriya | Sciencx [Online]. Available: https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/. [Accessed: ]
rf:citation
» Oracle Database — Multitenant Architecture, Create CDB and PDB | Kalana Eranda Jayasuriya | Sciencx | https://www.scien.cx/2021/08/09/oracle-database%e2%80%8a-%e2%80%8amultitenant-architecture-create-cdb-and-pdb/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.