Oracle Cloud Infrastructure Documentation

Unplugging/Plugging Non-CDB

You can use this method only if the on-premises platform is little endian, and the on-premises database and the Oracle Cloud Infrastructure Database database have compatible database character sets and national character sets.

You can use the unplug/plug method to migrate an Oracle Database 12c non-CDB database to a PDB in an Oracle Database 12c database on a Database service database deployment. This method provides a way to consolidate several non-CDB databases into a single Oracle Database 12c multitenant database on the Database service.

To migrate an Oracle Database 12c non-CDB database to the Oracle Database 12c database on a Database service deployment using the plug/unplug method, you perform these tasks:

  1. On the on-premises database host, invoke SQL*Plus and set the on-premises database to READ ONLY mode.

  2. On the on-premises database host, execute the DBMS_PDB.DESCRIBE procedure to generate an XML file containing the list of datafiles that will be plugged in on the cloud database.

  3. Use a secure copy utility to transfer the XML file and the datafiles to the Database service compute node.

  4. On the Database service compute node, invoke SQL*Plus and execute the CREATE PLUGGABLE DATABASE command to plug the database into the CDB.

  5. On the Database service compute node, execute the $ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql script to delete unnecessary metadata from the SYSTEM tablespace of the new PDB.

  6. On the Database service compute node, open the new PDB by executing the ALTER PLUGGABLE DATABASE OPEN command.

  7. Optionally, on the on-premises database host invoke SQL*Plus and set the on-premises database back to READ WRITE mode.

For more information, see "Creating a PDB Using a Non-CDB" in Oracle Database Administrator's Guide for Release 12.2 or 12.1.