Oracle RMAN – How to Move PDB to a New Host

oracleoracle-12crman

We're using Oracle 12c, and have two separate servers running Oracle, with a CDB with 2 PDBs.

What is the easiest way of getting the data from server A to server B, as a one-time job (not replication)?

So far I can imagine the following alternatives:

  1. Do a TRANSPORTABLE RMAN backup, copy it to the second host, do a restore there
  2. Do a datapump export, move it to the second host, restore there
  3. Unplug the PDB, copy its xml-file and data to the second host, plug it in there

About alternative 3, I'm not even sure if it's a real option.
Which of these alternatives would be easiest to accomplish?

I've tried to read up on the Oracle documentation, but it's very verbose and not at all easy to comprehend (which I suppose is why they're selling so much support services).

Best Answer

Option 3.

Unplug the PDB:

Unplugging a PDB

ALTER PLUGGABLE DATABASE salespdb UNPLUG INTO '/oracle/data/salespdb.xml';

Copy the files (XML + database files), then perform the checks listed below:

Plugging In an Unplugged PDB

Finally plug in the PDB:

Examples of Plugging In an Unplugged PDB

CREATE PLUGGABLE DATABASE salespdb USING '/disk1/usr/salespdb.xml' NOCOPY TEMPFILE REUSE;