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:
CODEsnapshot 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
Execute the
database export
command.CODEdelphix> database export
Set the database export parameters type, storage strategy type, ASM layout type and the target ASM data diskgroup.
CODEdelphix 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
Set the transfer strategy type and base mount point.
CODEdelphix database export *> set transferStrategy.type=OracleExportPDBTimeflowPointTransferStrategy delphix database export *> set transferStrategy.mountBase=/mnt/provision
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.
CODEdelphix 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
Set the Timeflow point parameters. In the below example, the latest Timeflow point for the pluggable database is being specified for export.
CODEdelphix 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.
Optionally set the following parameters:
Target ASM disk group for redo log files.
Number of RMAN channels. Default value for the RMAN channels is 8.
RMAN file section size. Default value is 0 (i.e. RMAN file section size is not set).
CODEdelphix 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.
Check that all the settings you require are in place using the
ls
command.
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 *>
Initiate the export by committing the operation in the CLI.
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.