CLI cookbook: migrating a virtual PDB in a virtual CDB
Delphix supports migrating from a vPDB in a virtual CDB, to another linked or virtual CDB.
This topic describes how to migrate a virtual pluggable database (vPDB) in a virtual CDB to another virtual CDB using the command-line interface.
Pre-requisites
You should already set up and have Delphix discover a container database in the same environment as the vPDB currently is or from an environment to which the vPDB will be migrated to.
Procedure
Log into the Delphix command-line interface using the admin user or a user with admin privileges.
ACTIONSCRIPT3ssh admin@YOUR_ENGINE
Disable the vPDB.
ACTIONSCRIPT3delphix> /sourcedelphix source> select myPDBdelphix source 'myPDB'> disabledelphix source 'myPDB' disable *> commit Dispatched job JOB-35 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 environment user and repository ( ORACLE_HOME ) for the vPDB to the appropriate user from the new host.
ACTIONSCRIPT3delphix> /sourceconfigdelphix sourceconfig> select myPDBdelphix sourceconfig 'myPDB'> updatedelphix sourceconfig 'myPDB' update *> set repository='/u01/app/oracle/product/19.0.0.0/dbhome_1'delphix sourceconfig 'myPDB' update *> set environmentUser='/oracle'delphix sourceconfig 'myPDB' update *> commit Dispatched job JOB-38 SOURCE_CONFIG_UPDATE job started for "myPDB". SOURCE_CONFIG_UPDATE job for "myPDB" completed successfully.
Change the environment user and repository ( ORACLE_HOME ) for the vCDB to the appropriate user from the new host. This must match the settings in step 3.
ACTIONSCRIPT3delphix sourceconfig 'myPDB'> /sourceconfig/delphix sourceconfig> select myCDBdelphix sourceconfig 'myCDB'> updatedelphix sourceconfig 'myCDB' update *> set repository='/u01/app/oracle/product/19.0.0.0/dbhome_1'delphix sourceconfig 'myCDB' update *> set environmentUser='/oracle'delphix sourceconfig 'myCDB' update *> commit Dispatched job JOB-39 SOURCE_CONFIG_UPDATE job started for "myCDB". SOURCE_CONFIG_UPDATE job for "myCDB" completed successfully.
Enable the vPDB.
POWERSHELLdelphix sourceconfig 'myCDB'> /sourcedelphix source> select myPDBdelphix source 'myPDB'> enabledelphix source 'myPDB' enable *> commit Dispatched job JOB-40 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 "myCDB". Virtual database "myCDB" was successfully started. 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. Creating PDB tempfiles. Checking Oracle pluggable database plugin violations. Virtual database "myPDB" was successfully started. Dataset "myPDB" enabled. SOURCE_ENABLE job for "myPDB" completed successfully.