Skip to main content
Skip table of contents

CLI cookbook: Migrating an Oracle RAC virtual PDB in 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.

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 be 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.

  • 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

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

    CODE
    ssh admin@YOUR_ENGINE
  2. Disable the vPDB.

    CODE
    delphix> /source
    delphix source> select racPDB
    delphix source 'racPDB'> disable
    delphix 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.

    CODE
    delphix source 'racPDB'> /sourceconfig/
    delphix sourceconfig> select racPDB
    delphix sourceconfig 'racPDB'> update
    delphix 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.

    CODE
    delphix sourceconfig 'racPDB'> /sourceconfig/
    delphix sourceconfig> select racCDB
    delphix sourceconfig 'racCDB'> update
    delphix 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 instances
    delphix sourceconfig 'racCDB' update instances *> ls
    Properties
        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=mwtestz1
    delphix sourceconfig 'racCDB' update instances *> set 1.node=mwtestz2
    delphix 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'> /sourced
    elphix source> select racPDB
    delphix source 'racPDB'> enable
    delphix 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.