Skip to main content
Skip table of contents

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

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

Prerequisites

You must specify the following parameters for the export:

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

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

  • Database name for the physical non-multitenant database.

  • Unique name for the physical non-multitenant database.

  • The target repository for the physical non-multitenant database. These can be listed with the /repository list command.

  • The instance name for the physical non-multitenant database.

  • The instance number for the physical non-multitenant database.

  • The snapshot or Timeflow point of an Oracle non-multitenant dSource or a VDB that needs to be exported to ASM. This will be referenced as the "container" in the Timeflow point parameters in step 6 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 a non-multitenant database "dexample”.

  • The database name and instance name for the physical non-multitenant database are both "asmdb".

  • The database unique name for the physical non-multitenant database is "asmdb_uniq".

  • The instance number for the physical non-multitenant database, which is 1 in this example, being a single-instance database.

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

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

  • The target repository is "ora1914-asm-tgt/'/u01/app/oracle/product/19.14.0.0/dbhome_1'“

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=OracleDBExportParameters
    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=OracleExportDBTimeflowPointTransferStrategy
    delphix database export *> set transferStrategy.mountBase=/mnt/provision
  4. Set the source config type to be a single instance non-multitenant Oracle, and set the database name, database unique name and target repository.

    CODE
    delphix database export *> edit transferStrategy.sourceConfig
    delphix database export transferStrategy.sourceConfig *> set type=OracleSIConfig
    delphix database export transferStrategy.sourceConfig *> set databaseName=asmdb
    delphix database export transferStrategy.sourceConfig *> set uniqueName=asmdb_uniq
    delphix database export transferStrategy.sourceConfig *> set repository=ora1914-asm-tgt/'/u01/app/oracle/product/19.14.0.0/dbhome_1'
  5. Set the instance name and number. In case of a single-instance database, the instance number will be 1. The instance name that is specified will be the SID of the resulting physical database upon successful completion of the export procedure.

    CODE
    delphix database export transferStrategy.sourceConfig *> edit instance
    delphix database export transferStrategy.sourceConfig instance *> set instanceName=asmdb
    delphix database export transferStrategy.sourceConfig instance *> set instanceNumber=1
    delphix database export transferStrategy.sourceConfig instance *> back
    delphix database export transferStrategy.sourceConfig *> back
  6. Set the Timeflow point parameters. In the below example, the latest timeflow point for the non-multitenant database is being specified for export.

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

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

  1. Optionally set the following parameters:

    1. Target ASM diskgroup 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" in the Export an Oracle VDB or a vPDB to a Physical ASM or Exadata Database article.

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

CODE
delphix database export *> ls
Properties
    type: OracleDBExportParameters (*)
    storageStrategy:
        type: OracleExportASMStorageStrategy (*)
        asmLayout:
            type: OracleASMLayout (*)
            defaultDataDiskgroup: +DATA (*)
            redoDiskgroup: (unset)
    transferStrategy:
        type: OracleExportDBTimeflowPointTransferStrategy (*)
        configParams: (unset)
        mountBase: /mnt/provision (*)
        rmanChannels: 8 (*)
        rmanFileSectionSizeInGb: 0 (*)
        sourceConfig:
            type: OracleSIConfig (*)
            databaseName: asmdb (*)
            environmentUser: (unset)
            instance:
                type: OracleInstance (*)
                instanceName: asmdb (*)
                instanceNumber: 1 (*)
            linkingEnabled: true (*)
            nonSysCredentials: (unset)
            nonSysUser: (unset)
            repository: ora1914-asm-tgt/'/u01/app/oracle/product/19.14.0.0/dbhome_1' (*)
            services: (unset)
            tdeKeystorePassword: (unset)
            uniqueName: asmdb_uniq (*)
        timeflowPointParameters:
            type: TimeflowPointSemantic (*)
            container: dexample (*)
            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-65
    DB_EXPORT job started for "dexample".
    Provisioning temporary virtual database "asmdb_uniq" from the chosen snapshot or point-in-time for exporting.
    Provisioning of temporary virtual database "asmdb_uniq" completed successfully.
    Starting export of database "asmdb" at "Untitled/dexample time: Wed Sep 20 14:00:13 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 "asmdb_uniq".
    Unexporting storage containers.
    Virtual database "asmdb_uniq" disabled.
    The export job for virtual source 'ORACLE_VIRTUAL_SOURCE-9' with name 'asmdb_uniq' got COMPLETED. Started cleanup for the same. Monitor job '<JOB-69>' and take suggested action if the cleanup fails.
    DB_EXPORT job for "dexample" completed successfully.

JavaScript errors detected

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

If this problem persists, please contact our support.