Skip to main content
Skip table of contents

CLI cookbook: migrating an Oracle RAC virtual PDB and a virtual CDB

Delphix supports migrating from a RAC vPDB in a virtual CDB, to another RAC linked CDB or virtual CDB. This feature is only available through the command-line interface.

Attempts to perform this migration via GUI will fail with the following error:

Error
The operation could not be completed because the virtual database “vPDB1" is disabled.
Error Code
exception.db.genericvdb.disabled

This topic describes how to migrate a RAC virtual pluggable database (vPDB) in a virtual CDB to another RAC 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

  1. Log into the Delphix command-line interface using the admin user or a user with admin privileges.

    ACTIONSCRIPT3
    ssh admin@YOUR_ENGINE
  2. Disable the vPDB.

    ACTIONSCRIPT3
    delphix> /sourcedelphix source> select racPDBdelphix source 'racPDB'> disabledelphix source 'racPDB' disable *> commit    Dispatched job JOB-74    SOURCE_DISABLE job started for "racPDB".    Disabling virtual database "racPDB".    Unexporting storage containers.    Virtual database "racPDB" disabled.    SOURCE_DISABLE job for "racPDB" completed successfully.
  3. Change the environment user and repository ( ORACLE_HOME ) for the vPDB to the appropriate user from the new host.

    ACTIONSCRIPT3
    delphix source 'racPDB'> /sourceconfig/delphix sourceconfig> select racPDBdelphix sourceconfig 'racPDB'> updatedelphix sourceconfig 'racPDB' update *> set repository='/u01/app/oracle/product/12.1.0.2/dbhome_1'delphix sourceconfig 'racPDB' update *> set environmentUser=' /oracle'delphix sourceconfig 'racPDB' update *> commit    Dispatched job JOB-76    SOURCE_CONFIG_UPDATE job started for "racPDB".    SOURCE_CONFIG_UPDATE job for "racPDB" completed successfully.
  4. 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. The instance configuration must also be configured for the new hosts.

    ACTIONSCRIPT3
    delphix sourceconfig 'racPDB'> /sourceconfig/delphix sourceconfig> select racCDBdelphix sourceconfig 'racCDB'> updatedelphix sourceconfig 'racCDB' update *> set repository='/u01/app/oracle/product/12.1.0.2/dbhome_1'delphix sourceconfig 'racCDB' update *> set environmentUser=' /oracle'delphix sourceconfig 'racCDB' update *> edit instancesdelphix sourceconfig 'racCDB' update instances *> lsProperties    0:        type: OracleRACInstance        instanceName: racCDB1        instanceNumber: 1        node: mwtestx1    1:        type: OracleRACInstance        instanceName: racCDB2        instanceNumber: 2        node: mwtestx2Use the "add" command to add an element to this array.delphix sourceconfig 'racCDB' update instances *> set 0.node=mwtestz1delphix sourceconfig 'racCDB' update instances *> set 1.node=mwtestz2delphix sourceconfig 'racCDB' update instances *> commit    Dispatched job JOB-77    SOURCE_CONFIG_UPDATE job started for "racCDB".    SOURCE_CONFIG_UPDATE job for "racCDB" completed successfully.
  5. Enable the vPDB.

    CODE
    delphix sourceconfig 'racCDB'> /sourcedelphix source> select racPDBdelphix source 'racPDB'> enabledelphix source 'racPDB' enable *> commit    Dispatched job JOB-78    SOURCE_ENABLE job started for "racPDB".    Enabling dataset "racPDB".    Exporting storage containers from the Delphix Engine.    Mounting datasets.    Mounting filesystems for the virtual database instance "2".    Starting virtual database.    Starting instance 2 on virtual database "racCDB".    Virtual database "racCDB" was successfully started.    Starting virtual database.    Starting instance 2 on virtual database "racPDB".    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 "racPDB" was successfully started.    Mounting datasets.    Mounting filesystems for the virtual database instance "1".    Starting virtual database.    Starting instance 1 on virtual database "racCDB".    Virtual database "racCDB" was successfully started.    Starting virtual database.    Starting instance 1 on virtual database "racPDB".    Opening Oracle database.    Checking Oracle pluggable database plugin violations.    Virtual database "racPDB" was successfully started.    Dataset "racPDB" enabled.    SOURCE_ENABLE job for "racPDB" completed successfully.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.