Forum Stats

  • 3,855,134 Users
  • 2,264,463 Discussions
  • 7,905,907 Comments

Discussions

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

Cooldba
Cooldba Member Posts: 34
edited Mar 27, 2019 12:41PM in Multitenant

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.

Tagged:
Werner S

Answers

  • Emad Al-Mousa
    Emad Al-Mousa Member Posts: 716 Bronze Trophy
    edited Mar 27, 2019 12:41PM

    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/[email protected]//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.

    Werner S