Skip to main content
Skip table of contents

CLI cookbook: export a multitenant virtual pluggable Oracle database to ASM or Physical Filesystem

This topic describes how to perform an in-place conversion of a multitenant virtual pluggable database (vPDB) to a multitenant physical Oracle pluggable database (PDB) using the Delphix Engine Command-line Interface (CLI). This procedure will work irrespective of the vPDB being a single instance configuration or RAC.

Prerequisites

You must have the following configuration before you start the export:

  • If exporting to ASM – the target Data diskgroup, or the diskgroup that will contain all the database files, or if exporting to a physical filesystem – the filesystem path where all the datafiles will be exported.

  • The vPDB that needs to be exported to ASM or physical filesystem.

  • Optionally, the pluggable database name for the resulting physical pluggable database and the number of RMAN channels.

If the vPDB is being renamed during the export, confirm there is no other PDB with the same name in the target CDB before starting the below procedure. If a PDB with the same name exists in the target CDB, the export operation will fail before starting the actual movement of datafiles.

Procedure

  1. Execute the database export command.

    CODE
    delphix> database export
  2. Set the database export parameters type.

    CODE
    delphix database export *> set type=OraclePDBExportParameters
  3. Set the storage strategy:

    1. Exporting to ASM:

      1. Set the storage strategy type to OracleExportASMStorageStrategy.

        CODE
        delphix database export *> set storageStrategy.type=OracleExportASMStorageStrategy
      2. Set the default target data diskgroup in asmLayout.

        CODE
        delphix database export *> set storageStrategy.asmLayout.type=OracleASMLayout
        delphix database export *> set storageStrategy.asmLayout.defaultDataDiskgroup=+DATA

        Note: redoDiskgroup parameter is not required for PDB export.

    2. Exporting to a Physical Filesystem:

      1. Set the storage strategy type to OracleExportFilesystemStorageStrategy.

        CODE
        delphix database export *> set storageStrategy.type=OracleExportFilesystemStorageStrategy
      2. Set the data directory in the filesystemLayout object to the location on the filesystem where all the datafiles should be exported.

        CODE
        delphix database export *> edit storageStrategy.filesystemLayout
        delphix database export storageStrategy.filesystemLayout *> set type=OracleExportTimeflowFilesystemLayout
        delphix database export storageStrategy.filesystemLayout *> set dataDirectory=/path/to/exported/datafiles
        delphix database export storageStrategy.filesystemLayout *> back

        Note:

        1. All the properties in the storageStrategy.filesystemLayout object are optional and only dataDirectory is applicable here.

        2. If the datafile location is not specified via dataDirectory property, the default location for the exported datafiles is under db_create_file_dest of the target CDB.

  4. Set the transfer strategy type and virtual source.

    CODE
    delphix database export *> set transferStrategy.type=OracleExportPDBInPlaceTransferStrategy
    delphix database export *> set transferStrategy.virtualSource=v2p_pdb

Info: The above values are just examples. Replace the values such as default data diskgroup, data directory and virtual source name to match your needs.

  1. Optionally set the following parameters:

    1. pluggable database name for the resulting physical pluggable database.

      1. If a pluggable database name is specified, the target CDB should not have a PDB with the same name, otherwise the export will fail.

      2. If no pluggable database name is specified, the default is the current name of the pluggable database.

    2. Number of RMAN channels. The default value for the RMAN channels is 8.

    3. RMAN file section size. The default value is 0 (i.e. RMAN file section size is not set).

      CODE
      delphix database export *> set transferStrategy.pdbName=v2asm_pdb
      delphix database export *> set transferStrategy.rmanChannels=10
      delphix database export *> set transferStrategy.rmanFileSectionSizeInGb=64

The above values are just examples. Replace the PDB name, number of RMAN channels and RMAN file section size to match your needs. For more details on RMAN channels and RMAN file section size, refer to Performance tuning considerations for Oracle databases with bigfile tablespaces.

  1. Commit the configuration to execute the job.

CODE
delphix database export *> commit

The export operation takes a snapshot of the vPDB before proceeding with the export. After a successful export operation, the original vPDB will be left in a DISABLED state. If the vPDB needs to be re-enabled, the vPDB needs to be migrated to a different host and/or CDB. Ensure there is no PDB with the same name as the vPDB on the target CDB. Subsequently, you must rewind the vPDB to the latest snapshot, after which the vPDB will be back up and running. Since the export operation takes a snapshot before the actual export, the rewind can be performed to the point just before the export started.

Refer to the Exporting an Oracle VDB or a vPDB in-place to ASM page for additional considerations after a successful export.

JavaScript errors detected

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

If this problem persists, please contact our support.