Skip to main content
Delphix

Oracle RAC VDB provisioning using the Delphix Command Line Interface

Goal

After examining this how-to you will have the steps, configuration options and a process for performing an Oracle RAC provision of a virtual database (VDB) from the Delphix Command Line Interface (CLI).

Identify the dSource snapshot from which the VDB is to be provisioned.

o List all snapshots for the specific dSource database and find the snapshot required for the provision.

dlpx5160> snapshot
dlpx5160 snapshot> list database=db112
NAME                         CONTAINER  LATESTCHANGEPOINT.LOCATION  LATESTCHANGEPOINT.TIMESTAMP
'@2017-09-27T03:17:30.478Z'  db112      4539849                     2017-09-27T03:17:08.000Z
'@2017-09-27T03:53:32.792Z'  db112      4543597                     2017-09-27T03:53:19.000Z

o In this scenario the provision will be performed using the snapshot identified as '@2017-09-27T03:17:30.478Z'.

o Move to the database provision context in the CLI and set the timeflowPointParameters properties type and snapshot to allow the VDB to be provisioned from the snapshot '@2017-09-27T03:17:30.478Z'

dlpx5160 snapshot> cd ..
dlpx5160> database provision
dlpx5160 database provision *> set timeflowPointParameters.type=TimeflowPointSnapshot 
dlpx5160 database provision *> set timeflowPointParameters.snapshot='@2017-09-27T03:17:30.478Z'

o Set the name for the VDB that will appear in the Delphix UI

dlpx5160 database provision *> set container.name=vplb112

o Set the group the VDB will be placed in the Delphix UI Datasets management screen.

dlpx5160 database provision *> set container.group=Targets

o Identify the mount point the VDB NFS mounts are to be mounted against on the target host environment.

dlpx5160 database provision *> set source.type=OracleVirtualSource

o The VDB to be provisioned is to be RAC so this must be set as the type of VDB configuration to be deployed so the correct options appear and can be filled out in the CLI. This must be set prior to moving on any further.

dlpx5160 database provision *> set sourceConfig.type=OracleRACConfig

o The following configuration options should be seen after setting the sourceConfig type to OracleRACConfig.

dlpx5160 database provision *> ls
Properties
    type: OracleProvisionParameters
    container:
        type: OracleDatabaseContainer
        name: vplb112 (*)
        description: (unset)
        diagnoseNoLoggingFaults: true
        group: Targets (*)
        performanceMode: DISABLED
        preProvisioningEnabled: false
        sourcingPolicy: (unset)
    credential: (unset)
    maskingJob: (unset)
    newDBID: false
    openResetlogs: true
    physicalStandby: false
    source:
        type: OracleLiveSource
        name: (unset)
        allowAutoVDBRestartOnHostReboot: false (*)
        archivelogMode: true
        config: (unset)
        configParams: (unset)
        configTemplate: (unset)
        customEnvVars: (unset)
        dataAgeWarningThreshold: 900sec
        fileMappingRules: (unset)
        manualProvisioning: false
        mountBase: /mnt/provision (*)
        nodeListenerList: (unset)
        operations: (unset)
        redoLogGroups: 3
        redoLogSizeInMB: 0
    sourceConfig:
        type: OracleRACConfig (*)
        crsDatabaseName: (unset)
        databaseName: (required)
        environmentUser: (unset)
        instances: (required)
        linkingEnabled: true
        nonSysCredentials: (unset)
        nonSysUser: (unset)
        repository: (required)
        services: (unset)
        uniqueName: (required)
    timeflowPointParameters:
        type: TimeflowPointSnapshot (*)
        snapshot: '@2017-09-27T03:17:30.478Z' (*)
    username: (unset)

Operations
defaults

All those options showing required must be filled out prior to committing the provision attempt.

o Set the new VDB's Oracle database name (parameter db_name) and the database unique name (parameter db_unique_name). In this case they will be the same value.

dlpx5160 database provision *> set sourceConfig.databaseName=vplb112
dlpx5160 database provision *> set sourceConfig.uniqueName=vplb112 

o The VDB repository dictates which Oracle Home and host environment (in this case a cluster) within Delphix that the target VDB is to use. Using the TAB key after entering set sourceConfig.repository= will show all available repositories.

dlpx5160 database provision *> set sourceConfig.repository=
'/u01/app/oracle/12.1'                                       '/u01/app/oracle/product/11.2.0.2/dbhome_1'                  '/u01/app/oracle/product/11.2.0.4/dbhome_1'
'/u01/app/oracle/product/11.2.0/dbhome_4/longpath/11.2.0.4'  '/u01/app/oracle/product/12.1.0/dbhome_1'                    E-Business Suite R12.1 appsTier
E-Business Suite R12.1 dbTechStack                           E-Business Suite R12.2 appsTier                              E-Business Suite R12.2 dbTechStack
OECL10/'/u01/app/oracle/product/11.2.0/dbhome_1'             OELC8/'/u01/app/oracle/product/11.2.0/dbhome_1'              Unstructured Files


dlpx5160 database provision *> set sourceConfig.repository=OECL10/'/u01/app/oracle/product/11.2.0/dbhome_1'   >>> Set the Oracle Home Repository

o Configure the RAC instances for the new VDB

dlpx5160 database provision *> edit sourceConfig.instances

o Add the First of the RAC instances to the configuration

dlpx5160 database provision sourceConfig.instances 0 *> set instanceName=vplb1121
dlpx5160 database provision sourceConfig.instances 0 *> set instanceNumber=1
dlpx5160 database provision sourceConfig.instances 0 *> set node=oelc10n1

dlpx5160 database provision sourceConfig.instances 0 *> ls
Properties
    type: OracleRACInstance (*)
    instanceName: vplb1121 (*)
    instanceNumber: 1 (*)
    node: oelc10n1 (*)

o Move back up the context tree to configure the second instance

dlpx5160 database provision sourceConfig.instances 0 *> back

dlpx5160 database provision sourceConfig.instances *> ls
Properties
    0:
        type: OracleRACInstance (*)
        instanceName: vplb1121 (*)
        instanceNumber: 1 (*)
        node: oelc10n1 (*)

Use the "add" command to add an element to this array.

o Add the second instance

dlpx5160 database provision sourceConfig.instances *> add
dlpx5160 database provision sourceConfig.instances 1 *> set instanceName=vplb1122
dlpx5160 database provision sourceConfig.instances 1 *> set instanceNumber=2
dlpx5160 database provision sourceConfig.instances 1 *> set node=oelc10n2
dlpx5160 database provision sourceConfig.instances *> ls
Properties
    0:
        type: OracleRACInstance (*)
        instanceName: vplb1121 (*)
        instanceNumber: 1 (*)
        node: oelc10n1 (*)
    1:
        type: OracleRACInstance (*)
        instanceName: vplb1122 (*)
        instanceNumber: 2 (*)
        node: oelc10n2 (*)

Use the "add" command to add an element to this array.

o Move back up the context tree to check the configuration settings prior to kicking off the provision.

dlpx5160 database provision sourceConfig.instances *> back

o Check all the required settings are in place and the instances and the remainder of the configuration are correct.

dlpx5160 database provision *> ls
Properties
    type: OracleProvisionParameters
    container:
        type: OracleDatabaseContainer
        name: vplb112 (*)
        description: (unset)
        diagnoseNoLoggingFaults: true
        group: Targets (*)
        performanceMode: DISABLED
        preProvisioningEnabled: false
        sourcingPolicy: (unset)
    credential: (unset)
    maskingJob: (unset)
    newDBID: false
    openResetlogs: true
    physicalStandby: false
    source:
        type: OracleLiveSource
        name: (unset)
        allowAutoVDBRestartOnHostReboot: false (*)
        archivelogMode: true
        config: (unset)
        configParams: (unset)
        configTemplate: (unset)
        customEnvVars: (unset)
        dataAgeWarningThreshold: 900sec
        fileMappingRules: (unset)
        manualProvisioning: false
        mountBase: /mnt/provision (*)
        nodeListenerList: (unset)
        operations: (unset)
        redoLogGroups: 3
        redoLogSizeInMB: 0
    sourceConfig:
        type: OracleRACConfig (*)
        crsDatabaseName: (unset)
        databaseName: vplb112 (*)
        environmentUser: (unset)
        instances:
            0:
                type: OracleRACInstance (*)
                instanceName: vplb1121 (*)
                instanceNumber: 1 (*)
                node: oelc10n1 (*)
            1:
                type: OracleRACInstance (*)
                instanceName: vplb1122 (*)
                instanceNumber: 2 (*)
                node: oelc10n2 (*)
        linkingEnabled: true
        nonSysCredentials: (unset)
        nonSysUser: (unset)
        repository: (required)
        services: (unset)
        uniqueName: vplb112 (*)
    timeflowPointParameters:
        type: TimeflowPointSnapshot (*)
        snapshot: '@2017-09-27T03:17:30.478Z' (*)
    username: (unset)

Operations
defaults
dlpx5160 database provision *>

o Start the provision attempt by comitting the settings in the CLI

dlpx5160 database provision *> commit
    vplb112
    Dispatched job JOB-186
    DB_PROVISION job started for "Targets/vplb112".
    Starting provision of the virtual database "vplb112".
    Creating new TimeFlow.
    Generating recovery scripts.
    Exporting storage.
    Mounting filesystems for the virtual database instance "1".
    Mounting read-only archive log filesystem for the virtual database instance "1".
    Recovering Oracle database.
    Opening the virtual database "vplb112".
    Opening Oracle database.
    Oracle recovery was successful.
    Unmounting read-only archive log filesystem for the virtual database instance "1".
    The virtual database "vplb112" was successfully provisioned.
    DB_PROVISION job for "Targets/vplb112" completed successfully.

dlpx5160 database>