This section describes the procedure for migrating a pluggable database (PDB) between container databases (CDB) protected by LifeKeeper. We recommend to make a backup of the database in advance.
How to Migrate
This section describes how to migrate a PDB using the PDB plug/unplug method.The figure below shows an example of a configuration for migrating a PDB (TESTPDB) from the source CDB (ORCLCDB1) to the target CDB (ORCLCDB2).
- Before migration, connect to the source CDB and check the information of the PDB to migrate.
SQL> COLUMN NAME FORMAT A8
SELECT NAME, DBID, GUID FROM V$CONTAINERS WHERE NAME=’<PDB>’;
- Bring the Oracle PDB resource out of service and delete the resource. If you have an Oracle PDB resource that protects more than one PDB, remove the PDB from protection from the resource setting Change Protection PDB (see Changing the PDB to Protect).
- Connect to the source CDB and unplug the PDB. (If the PDB is not stopped, stop the PDB.)
SQL> ALTER PLUGGABLE DATABASE <PDB> UNPLUG INTO ‘/home/oracle/<PDB>.xml’;
SQL> DROP PLUGGABLE DATABASE <PDB>;
- Connect to the target CDB, plug in the PDB and start it.
SQL> CREATE PLUGGABLE DATABASE <PDB> USING ‘/home/oracle/<PDB>.xml’ <COPY|NOCOPY>;
SQL> ALTER PLUGGABLE DATABASE <PDB> OPEN;
- Verify that the PDB information matches before and after the migration.
SQL> COLUMN NAME FORMAT A8
SELECT NAME, DBID, GUID FROM V$CONTAINERS WHERE NAME=’<PDB>’;
- Create an Oracle PDB resource specifying the target CDB. If you already have an Oracle PDB resource that protects PDB, you can add the PDB for protection from the resource settings Change Protection PDB (see Changing the PDB to Protect) to manage it with a single resource.
Post your comment on this topic.