Database Reference
In-Depth Information
Using Data Pump with CDBs
You can use Data Pump to migrate tables, schemas, or an entire database. Data Pump can
move this content from a non-CDB into a PDB and from a PDB to a non-CDB. Data Pump
can also move content between PDBs within the same CDB or between PDBs in different
CDBs. Content migration using Data Pump with PDBs is virtually the same as using Data
Pump with a non-CDB.
In Chapter 11, “Introduction to and Creation of Oracle Multitenant Data-
bases,” we demonstrate how to create CDBs and PDBs. The exercises in
this chapter assume that you have created a CDB and PDBs.
Using Data Pump to Move PDBs within or between CDBs
With the introduction of common users and local users in the multitenant environment,
there are some specific differences between how Data Pump export and import operate
with PDBs vs. non-CDBs.
If you're using Data Pump to move a PDB within the same CDB, this should not be a
problem. However, if you're moving a PDB to another CDB or a non-CDB, either using
a privileged schema or full database export, you must consider the impact of the common
user or users that you're exporting.
If the target CDB does not have a common user with the same name as the common user
or users in the export, then you can create the required common users in the target CDB.
Or you could use the REMAP_SCHEMA parameter when you run impdp .
REMAP_SCHEMA=C##common name:local user name
If the target CDB does not contain the common user or you do not specify the remap on
import, impdp will fail because of the common user mismatch on the username, and you'll
see the following error message:
ORA-65094:invalid local user or role name
Using Data Pump to Move a Database into a CDB
One use case for Data Pump is to move a full database into an empty PDB in a CDB. The
source database could be a PDB or a non-CDB.
Use Oracle Data Pump expdb to perform a full export of a source database, using the
transportable option if you choose. Once you've created a new PDB in a CDB, you can use
Data Pump impdp to move the full contents into the PDB.
Search WWH ::




Custom Search