Skip to main content
Skip table of contents

Refreshing or Rewinding an Oracle virtual database exported to a physical ASM database

The “Exporting an Oracle VDB or a vPDB in-place to ASM feature introduced in Delphix 9.0.0.0, allowed the export or in-place conversion of a virtual database to ASM, but the refresh or rewind operation was not allowed after the virtual database was exported to ASM.

Starting with the 12.0.0.0 release, Delphix allows a refresh or rewind operation to be performed on a virtual database (VDB or vPDB) after the V2ASM export job completes.

How to allow refresh/rewind on a virtual database after it has been exported to ASM?

A new parameter allowRefreshRewindPostV2P under operationsPostV2P has been introduced to allow refresh/rewind on the virtual database after it has been exported to ASM.

CODE
ip-10-110-247-210 database export *> ls
Properties
    type: OracleDBExportParameters (*)
    storageStrategy:
        type: OracleExportASMStorageStrategy (*)
        asmLayout:
            type: OracleASMLayout (*)
            defaultDataDiskgroup: +DATA (*)
            redoDiskgroup: (unset)
    transferStrategy:
        type: OracleExportDBInPlaceTransferStrategy (*)
        dbUniqueName: (unset)
        operationsPostV2P: (unset)
        rmanChannels: 8 (*)
        rmanFileSectionSizeInGb: 0 (*)
        virtualSource: VDBOMSRASF1B4_25I (*)

To allow the refresh or rewind operation on the virtual database after the export operation, set the parameter allowRefreshRewindPostV2P under operationsPostV2P as true.

On CLI, run the following command to set the same.

CUSTOM
set transferStrategy.operationsPostV2P.allowRefreshRewindPostV2P=true
CODE
ip-10-110-247-210 database export *> ls
Properties
    type: OracleDBExportParameters (*)
    storageStrategy:
        type: OracleExportASMStorageStrategy (*)
        asmLayout:
            type: OracleASMLayout (*)
            defaultDataDiskgroup: +DATA (*)
            redoDiskgroup: (unset)
    transferStrategy:
        type: OracleExportDBInPlaceTransferStrategy (*)
        dbUniqueName: (unset)
        operationsPostV2P:
            type: OracleExportOperationsPostV2P (*)
            allowRefreshRewindPostV2P: true (*)
        rmanChannels: 8 (*)
        rmanFileSectionSizeInGb: 0 (*)
        virtualSource: VDBOMSRASF1B4_25I (*)

After the export job, a physical database will be running on Oracle Host.

What happens if a refresh or rewind operation is attempted on a virtual database after export?

On refresh or rewind operation, the user will get an exception.

The refresh or rewind operation is not allowed because there is another database running on the Oracle host with the same SID. To go ahead with the refresh or rewind operation, shut down the physical database and then try doing the refresh operation again. The refresh or rewind operation will be successful now.

What if a user forgets to set the operationsPostV2P during export?

CUSTOM
ip-10-110-247-210 database export *> ls
Properties
    type: OracleDBExportParameters (*)
    storageStrategy:
        type: OracleExportASMStorageStrategy (*)
        asmLayout:
            type: OracleASMLayout (*)
            defaultDataDiskgroup: +DATA (*)
            redoDiskgroup: (unset)
    transferStrategy:
        type: OracleExportDBInPlaceTransferStrategy (*)
        dbUniqueName: (unset)
        operationsPostV2P: (unset)
        rmanChannels: 8 (*)
        rmanFileSectionSizeInGb: 0 (*)
        virtualSource: VDBOMSRASF1B4_5JK (*)

After the export job, if the user tries refresh or rewind operation on a virtual database, an exception will be thrown because the parameter allowRefreshRewindPostV2P is not set.

How can this parameter be set from the Delphix Engine CLI using source update API?

After the export operation, the Delphix source update API does not allow updating the parameters for a virtual database that has been disabled after an export operation. The only exception is the allowRefreshRewindPostV2P parameter, which can be set as shown below:

CODE
ip-10-110-247-210> source
ip-10-110-247-210 source> select VDBOMSRASF1B4_5JK
ip-10-110-247-210 source 'VDBOMSRASF1B4_5JK'> update
ip-10-110-247-210 source 'VDBOMSRASF1B4_5JK' update *> set allowRefreshRewindPostV2P=true
ip-10-110-247-210 source 'VDBOMSRASF1B4_5JK' update *> commit;
    Dispatched job JOB-116
    SOURCE_UPDATE job started for "VDBOMSRASF1B4_5JK".
    SOURCE_UPDATE job for "VDBOMSRASF1B4_5JK" completed successfully.

An attempt to update any other virtual database parameter will fail with the following error:

CUSTOM
ip-10-110-247-210 source 'VDBOMSRASF1B4_5JK' update *> set allowAutoVDBRestartOnHostReboot=true;
ip-10-110-247-210 source 'VDBOMSRASF1B4_5JK' update *> commit;
    Dispatched job JOB-117
    SOURCE_UPDATE job started for "VDBOMSRASF1B4_5JK".
    This operation is not allowed on source 'ORACLE_VIRTUAL_SOURCE-9' with name 'VDBOMSRASF1B4_5JK' as the source is disabled after a successful V2P job.
  Action: To re-enable, migrate this virtual source to a different host or a different CDB (if it is a virtual pluggable database) first and then rewind to the latest snapshot. Delete the virtual source if it is no longer needed. This does not impact the newly created physical database.
ip-10-110-247-210 source 'VDBOMSRASF1B4_5JK'>

After setting the parameter allowRefreshRewindPostV2P to true, the refresh or rewind operation will be successful from GUI.

JavaScript errors detected

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

If this problem persists, please contact our support.