Skip to main content
Skip table of contents

CLI cookbook: export a snapshot or a timeflow point of a multitenant pluggable Oracle database to ASM

This topic describes how to perform an export of a snapshot or a timeflow point belonging to a multitenant pluggable Oracle database to a physical pluggable database stored on an Oracle Automatic Storage Management (ASM) diskgroup using the Delphix Engine command-line interface. The export procedure provisions a temporary vPDB from the snapshot or timeflow point as specified in the CLI parameters and then performs an in-place conversion of the temporary vPDB to a physical database on an ASM diskgroup. This temporary vPDB is destroyed at the end of the export procedure.

Prerequisites

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

  • Target ASM data diskgroup, or the diskgroup on the target server that will contain all the database files.

  • The base mount point on the target server where the temporary vPDB data should be mounted.

  • Database name for the physical pluggable database.

  • A linked container database on the target system. This will be where the physical pluggable database will be plugged into, on the target system.

  • The snapshot or Timeflow point of an Oracle multitenant dSource or a PDB that needs to be exported to ASM. This will be referenced as the "container" in the Timeflow point parameters in step 5 below. You can run these commands to get the list of snapshots or Timeflow ranges:

    CODE
    snapshot list database=dexample
    timeflow "dexample" timeflowRanges; commit
  • Optionally, the target ASM disk group for redo log files, number of RMAN channels and the RMAN file section size.

In the example CLI export detailed below, the following configuration parameters are being passed:

  • The snapshot that is being exported to ASM belongs to PDB "CDOMLOTGAS2FPDB1“.

  • The database name for the physical pluggable database is "asmpdb".

  • The container database where the physical pluggable database will be exported into is "CDOMLOTGAS2F”.

  • The target ASM data diskgroup is "+DATA".

  • The base mount point on the target server is "/mnt/provision".

Procedure

  1. Execute the database export command.

    CODE
    delphix> database export
  2. Set the database export parameters type, storage strategy type, ASM layout type and the target ASM data diskgroup.

    CODE
    delphix database export *> set type=OraclePDBExportParameters
    delphix database export *> set storageStrategy.type=OracleExportASMStorageStrategy
    delphix database export *> set storageStrategy.asmLayout.type=OracleASMLayout
    delphix database export *> set storageStrategy.asmLayout.defaultDataDiskgroup=+DATA
  3. Set the transfer strategy type and base mount point.

    CODE
    delphix database export *> set transferStrategy.type=OracleExportPDBTimeflowPointTransferStrategy
    delphix database export *> set transferStrategy.mountBase=/mnt/provision
  4. Set the source config type as PDB config, and set the database name, database unique name and the linked container database where the resulting physical database will be exported into.

    CODE
    delphix database export *> edit transferStrategy.sourceConfig
    delphix database export transferStrategy.sourceConfig *> set type=OraclePDBConfig
    delphix database export transferStrategy.sourceConfig *> set databaseName=asmpdb
    delphix database export transferStrategy.sourceConfig *> set cdbConfig=CDOMLOTGAS2F
    delphix database export transferStrategy.sourceConfig *> back
  5. Set the Timeflow point parameters. In the below example, the latest timeflow point for the pluggable database is being specified for export.

    CODE
    delphix database export *> edit transferStrategy.timeflowPointParameters
    delphix database export transferStrategy.timeflowPointParameters *> set type=TimeflowPointSemantic
    delphix database export transferStrategy.timeflowPointParameters *> set container=CDOMLOTGAS2FPDB1
    delphix database export transferStrategy.timeflowPointParameters *> set location=LATEST_POINT
    delphix database export transferStrategy.timeflowPointParameters *> back

Info: The parameter values in steps 2 to 5 above are just examples. Replace the appropriate parameter values to match your needs.

  1. Optionally set the following parameters:

    1. Target ASM disk group for redo log files.

    2. Number of RMAN channels. Default value for the RMAN channels is 8. 

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

      CODE
      delphix database export *> set storageStrategy.asmLayout.redoDiskgroup=+REDO
      delphix database export *> set transferStrategy.rmanChannels=10
      delphix database export *> set transferStrategy.rmanFileSectionSizeInGb=64

Info: The above values are just examples. Replace the redo diskgroup, 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 the section titled "Performance tuning considerations for Oracle databases with bigfile tablespaces" on the Export an Oracle VDB or a vPDB to a Physical ASM or Exadata Database page.

  1. Check that all the settings you require are in place using the ls command.

CODE
delphix database export *> ls
Properties
    type: OraclePDBExportParameters (*)
    storageStrategy:
        type: OracleExportASMStorageStrategy (*)
        asmLayout:
            type: OracleASMLayout (*)
            defaultDataDiskgroup: +DATA (*)
            redoDiskgroup: (unset)
    transferStrategy:
        type: OracleExportPDBTimeflowPointTransferStrategy (*)
        configParams: (unset)
        mountBase: /mnt/provision (*)
        parentTdeKeystorePassword: (unset)
        parentTdeKeystorePath: (unset)
        rmanChannels: 8 (*)
        rmanFileSectionSizeInGb: 0 (*)
        sourceConfig:
            type: OraclePDBConfig (*)
            cdbConfig: CDOMLOTGAS2F (*)
            databaseName: asmpdb (*)
            environmentUser: (unset)
            linkingEnabled: true (*)
            nonSysCredentials: (unset)
            nonSysUser: (unset)
            repository: (unset)
            services: (unset)
        tdeExportedKeyFileSecret: (unset)
        tdeKeyIdentifier: (unset)
        timeflowPointParameters:
            type: TimeflowPointSemantic (*)
            container: CDOMLOTGAS2FPDB1 (*)
            location: LATEST_POINT (*)
delphix database export *> 
  1. Initiate the export by committing the operation in the CLI.

CODE
delphix database export *> commit
    Dispatched job JOB-72
    DB_EXPORT job started for "CDOMLOTGAS2FPDB1".
    Provisioning temporary virtual database "asmpdb" from the chosen snapshot or point-in-time for exporting.
    Provisioning of temporary virtual database "asmpdb" completed successfully.
    Starting export of database "asmpdb" at "Untitled/CDOMLOTGAS2FPDB1 time: Wed Sep 20 14:00:40 PDT 2023" to location "+DATA" on target environment "ora1914-asm-tgt".
    Generating V2P scripts.
    Setting up environment map.
    Setting up database for V2P.
    Performing backup as copy for database V2P.
    Performing Switch to copy for database V2P.
    Finalizing database V2P.
    Disabling virtual database "asmpdb".
    Unexporting storage containers.
    Virtual database "asmpdb" disabled.
    The export job for virtual source 'ORACLE_VIRTUAL_PDB_SOURCE-3' with name 'asmpdb' got COMPLETED. Started cleanup for the same. Monitor job '<JOB-82>' and take suggested action if the cleanup fails.
    DB_EXPORT job for "CDOMLOTGAS2FPDB1" completed successfully.

JavaScript errors detected

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

If this problem persists, please contact our support.