CLI cookbook: export a non-multitenant virtual Oracle database to ASM
This topic describes how to perform an export or an in-place conversion of a non-multitenant virtual database to a physical database using the Delphix Engine command-line interface. This procedure will work irrespective of the VDB 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 and the filesystem path where all the redo log files will be exported.
-
If exporting to a physical filesystem, both the delphix_os user and the Oracle software owner user (typically oracle) must have full access to the provided directories where all the datafiles and redo/archived log files will be exported.
-
The VDB that needs to be exported to ASM or a physical filesystem.
-
Optionally, the target ASM disk group for redo log files (if exporting to ASM), database unique name for the resulting physical database and the number of RMAN channels.
Procedure
-
Execute the
database export
command.Copydelphix> database export
-
Set the database export parameters type, transfer strategy type, storage strategy type, default target data diskgroup, data directory, archive directory and virtual source.
Exporting to ASM:
Copydelphix database export *> set type=OracleDBExportParameters
delphix database export *> set storageStrategy.type=OracleExportASMStorageStrategy
delphix database export *> set storageStrategy.asmLayout.defaultDataDiskgroup=+DATA
delphix database export *> set transferStrategy.type=OracleExportDBInPlaceTransferStrategy
delphix database export *> set transferStrategy.virtualSource=v2p_dbThe above values are just examples. Replace the default data diskgroup and virtual source name to match your needs.Exporting to a Physical Filesystem:
Copydelphix database export *> set type=OracleDBExportParameters
delphix database export *> set storageStrategy.type=OracleExportFilesystemStorageStrategy
delphix database export *> set storageStrategy.filesystemLayout.type=OracleFilesystemLayout
delphix database export *> set storageStrategy.filesystemLayout.dataDirectory=/v2p_db/data
delphix database export *> set storageStrategy.filesystemLayout.archiveDirectory=/v2p_db/archive
delphix database export *> set transferStrategy.type=OracleExportDBInPlaceTransferStrategy
delphix database export *> set transferStrategy.virtualSource=v2p_dbThe above values are just examples. Replace the dataDirectory, archiveDirectory and virtual source name to match your needs. both the delphix_os user and the Oracle software owner user (typically oracle) must have full access to the provided dataDirectory and archiveDirectory. -
Optionally set the following parameters:
-
Target ASM disk group for redo log files (if exporting to ASM).
-
Database unique name for the resulting physical database.
-
If no database unique name is specified, the default is the unique name of the VDB.
-
If a database unique name is specified, as noted in step 2 of this procedure, you need to ensure that a database instance with the same database unique name as the VDB is not running on the target host.
-
-
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).
Copydelphix database export *> set storageStrategy.asmLayout.redoDiskgroup=+REDO
delphix database export *> set transferStrategy.dbUniqueName=v2asm_db
delphix database export *> set transferStrategy.rmanChannels=10
delphix database export *> set transferStrategy.rmanFileSectionSizeInGb=64The above values are just examples. Replace the redo diskgroup, database unique 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.
-
-
Commit the configuration to execute the job.
Copydelphix database export *> commit
The export operation takes a snapshot of the VDB before proceeding with the export. After a successful export operation, the original VDB will be left in a DISABLED state. If the VDB needs to be re-enabled, the VDB needs to be migrated to a different host. Ensure there is no instance running with the same name as the VDB on the target host. Subsequently, you must rewind the VDB to the latest snapshot, after which the VDB 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 or the Exporting an Oracle VDB or vPDB in-place to a physical filesystem pages for additional considerations after a successful export.