1 Reply Latest reply on Mar 27, 2019 4:41 PM by Emad Al-Mousa

    How to Export/Import 12c Container Database with underlying all pluggable databases

    Cooldba

      Hi,

       

      We have many customers running 12.1 and 12.2 Multitenant Database environment wanted to migrate to cloud.
      There are few customers wants to migrate the entire CDB with all underlying PDBs using Datapump ,whereas few customers simply want to migrate only PDBs.

       

      I dont see any MOS note mentioned about this approach.

      Also, Does PDB FULL=Y Export/Import requires users,tablespaces precreated before importing?

       

      Appreciate if anyone share the details.

        • 1. Re: How to Export/Import 12c Container Database with underlying all pluggable databases
          Emad Al-Mousa

          Hi,

           

          define a directory:

           

          SQL> select * from dba_directores;

          Location of the export file will be here....for example:

          C:\app\oracle\product\12.1.0\dbhome_3\

          SQL> create or replace directory DATA_PUMP_DIR as 'C:\oracle\emodb\product\12.1.0\dbhome_3\';

           

          SCENARIO 1: FULL EXPORT

          expdp system/XXXXX directory=DATA_PUMP_DIR dumpfile=exp _full.dmp logfile=exp_full_log.log full=Y

           

          Exporting using “full” keyword will export only CDB$ROOT objects only and won’t export any pluggable databases in the process.

           

           

          SCENARIO 2: EXPORT FULL PLUGGABLE DATABASE LEVEL

           

          Using the command to export backup pdb_test pluggable database

          expdp system/XXXX@//localhost:1521/pdb_test directory=DATA_PUMP_PDBTEST dumpfile=FULL_PDB_TEST.dmp full=y logfile=FULL_PDB_TEST_EXP.log

           

          within the pluggable database you need to define a directory to place the dump file.