Skip to main content
Skip table of contents

CLI cookbook: V2P (Virtual to Physical) of a single instance Oracle database with datafiles on separate file systems

This topic describes how to provision a physical single-instance Oracle database, with datafiles on separate file systems, using the Delphix Engine command-line interface.

By default, all of the customizable directories - dataarchivetempexternal, and script will be placed under the target directory, with additional config files placed in the target directory itself. This provides no mechanism to place datafiles on separate file systems (i.e. /data1 and /data2, which have the root directory as a common point). In order to allow this, the useAbsolutePathForDataFiles parameter must be specified.

Prerequisites

You will need the following information:

  • The instance name, instance number, and unique name of the Oracle database to create.

  • The source dSource or VDB from which to provision.

  • The semanticLocation, SCN, or timestamp of the point of which to provision from. Run these commands to get the list of snapshots or Timeflow ranges:

    CODE
    snapshot list database=dexample
    timeflow "dexample" timeflowRanges; commit
  • The layout of the filesystems on the target server where data should be exported.

  • The source repository (oracle install) in which to create the VDB. These can be listed with the /repository list command.

Procedure

  1. Execute the database exportcommand.

    CODE
    delphix> database export
  2. Set the Timeflow point type, source container, and location.

    CODE
    delphix database export *> set timeflowPointParameters.type=TimeflowPointSemanticdelphix database export *> set timeflowPointParameters.container=dexample
    delphix database export *> set timeflowPointParameters.location=LATEST_SNAPSHOT
  3. Edit the sourceConfig configuration, specifying the parameters for the database created via V2P.

    CODE
    delphix database export *> edit sourceConfig
    delphix database export sourceConfig *> set type=OracleSIConfig 
    delphix database export sourceConfig *> edit instance
    delphix database export sourceConfig instance *> ls
    delphix database export sourceConfig instance *> set instanceName=v2p_db
    delphix database export sourceConfig instance *> set instanceNumber=1
    delphix database export sourceConfig instance *> back
    delphix database export sourceConfig *> set repository=tserver/'/u01/app/ora11204/product/11.2.0/dbhome_1'
    delphix database export sourceConfig *> set uniqueName=v2p_db
    delphix database export sourceConfig *> set databaseName=v2p_db
    delphix database export sourceConfig *> back
  4. Set the destination locations, including setAbsolutePathForDataFilesto be true.

    CODE
    delphix database export *> set filesystemLayout.targetDirectory=/v2p_db
    delphix database export *> set filesystemLayout.archiveDirectory=archive 
    delphix database export *> set filesystemLayout.dataDirectory=datafiles 
    delphix database export *> set filesystemLayout.externalDirectory=external 
    delphix database export *> set filesystemLayout.scriptDirectory=script 
    delphix database export *> set filesystemLayout.tempDirectory=tempdelphix 
    database export *> set filesystemLayout.useAbsolutePathForDataFiles=true
  5. Specify the file mapping rules for each datafile and the location to which it should be exported. Each entry should be separated by a newline, and the entire mapping within double quotes.

    CODE
    set fileMappingRules="/u01/app/oracle/oradata/datafile1.dbf:/data1/datafile1.dbf
    /u01/app/oracle/oradata/datafile2.dbf:/data1/datafile2.dbf
    /u01/app/oracle/oradata/datafile3.dbf:/data2/datafile3.dbf
    /u01/app/oracle/oradata/datafile4.dbf:/data2/datafile4.dbf"
  6. Commit the configuration to execute the job.

    CODE
    delphix database export *> commit
JavaScript errors detected

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

If this problem persists, please contact our support.