Different ways to create Pluggable Database (PDB) in Oracle 19c

 In Oracle 19c, Pluggable database can be created from different ways with various source. Below diagram shows the various ways which can be used to create PDB.


Let’s discuss briefly each of these methods:

1.    Creating from scratch:

In this method, the seed PDB is taken as source PDB for creating the new PDB. As you know, the seed PDB is automatically created when you create the Container database (CDB). The seed PDB is always in read-only mode and you cannot open it in read-write mode.

When you create the PDB from scratch, then Oracle will use the seed PDB as a source template PDB. All the database files will be copied from the seed PDB to the new PDB and the new PDB will be created.

 

2.      Cloning

In this method, Oracle will clone the existing PDB (Either Local or Remote PDB) to create the new PDB. You need to specify the source PDB Name in your “CREATE PLUGGABLE DATABASE” command.

You can clone a PDB from the same CDB (local) or from another CDB (Remote) and create a new PDB.

 

3.      Relocation

In this method, you move the PDB from one CDB to another. You unplug the PDB from one CDB and plug it into another CDB. The unplug or plug PDB can be performed very easily with the help of just one line command.

 

4.      Plugging in

You can also unplug a database (PDB) from a CDB and keep the metadata information and the data files in the server (or backup location) for future use.  Unplugging means to export the metadata information of the PDB into an xml file and to copy all the database files of the PDB to store it. When needed, you can take any unplugged database files (xml and database files) and plug into any container database (using the metadata information stored in the xml file).

You can also generate the XML metadata information of a non-CDB using DBMS_PDB package and plug it into a CDB as a PDB.

 

5.    Referencing a proxy PDB

This is like a database link that we use to access data from another database. In this case, the remote data access is done by creating a proxy PDB in your CDB. You use the Proxy PDB to access the data from remote database through a database link.

 

These are the different ways of creating PDBs in Oracle 19c Container Database (19c)

No comments:

Post a Comment