This topic describes how to migrate a virtual pluggable database (vPDB) to a different another virtual or linked CDB using the CLI.
The new CDB may either be on the same or a different host to the existing CDB.
Prerequisites
-
The target CDB must already be created or discovered by Delphix.
-
If the Automatic VDB Restart feature is enabled for the vPDB and the target container database is a virtual CDB, before migration, you should ensure that either the Automatic Restart feature is also enabled for the target virtual CDB or the feature is disabled for the vPDB.
Procedure
This example shows moving a vPDB from a CDB in environment2 to a CDB in environment1.
-
Log into the Delphix command-line interface using the admin user or a user with admin privileges.
ssh admin@YOUR_ENGINE -
Disable the vPDB.
delphix> source delphix source> select MYPDB delphix source 'MYPDB'> disable delphix source 'MYPDB' disable *> commit Dispatched job JOB-64 SOURCE_DISABLE job started for "MYPDB". Disabling virtual database "MYPDB". Unexporting storage containers. Virtual database "MYPDB" disabled. SOURCE_DISABLE job for "MYPDB" completed successfully. delphix source 'MYPDB'> -
Change the cdbConfig, repository and environmentUser for the vPDB to the new CDB.
If the new CDB is on a different repository ( Oracle Home ), either on the same or a different host, then the repository and environmentUser must also be updated, otherwise only the cdbConfig is required to be updated.delphix> /sourceconfig delphix sourceconfig> select MYPDB delphix sourceconfig 'MYPDB'> update delphix sourceconfig 'MYPDB' update *> set cdbConfig=CDOMLOSRE21D delphix sourceconfig 'MYPDB' update *> set environmentUser=environment1/dlpxqa delphix sourceconfig 'MYPDB' update *> set repository=environment1/'/u01/app/oracle/product/19.18.0.0/dbhome_1' delphix sourceconfig 'MYPDB' update *> commit delphix sourceconfig 'MYPDB' update *> commit Dispatched job JOB-58 SOURCE_CONFIG_UPDATE job started for "MYPDB". SOURCE_CONFIG_UPDATE job for "MYPDB" completed successfully. -
Enable the vPDB.
delphix> /source delphix source> select MYPDB delphix source 'MYPDB'> enable delphix source 'MYPDB' enable *> commit Dispatched job JOB-59 SOURCE_ENABLE job started for "MYPDB". Enabling dataset "MYPDB". Exporting storage containers from the Delphix Engine. Mounting datasets. Mounting filesystems for the virtual database instance "1". Starting virtual database. Starting instance 1 on virtual database "MYPDB". Plugging in Oracle pluggable database. Opening Oracle pluggable database. Setting OMF destination for Oracle pluggable database. Checking Oracle pluggable database plugin violations. Virtual database "MYPDB" was successfully started. Dataset "MYPDB" enabled. SOURCE_ENABLE job for "MYPDB" completed successfully. delphix source 'MYPDB'>