Skip to main content
Delphix

Oracle RAC VDB provisioning using the Delphix Command Line Interface (KBA1109)

 

 

KBA

KBA# 1109

How to Perform an Oracle RAC VDB Provision Using the CLI

The aim of this how-to is to detail the process for performing Oracle RAC VDB provisioning using the Delphix Command Line Interface.  The RAC VDB will be provisioned using a specific snapshot from the RAC dSource. The dSource is a 2 Node/Instance RAC database and the provision is performed to a 2 node Oracle Cluster with 2 instances. 

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.
  1. List all snapshots for the specific dSource database and find the snapshot required for the provision.
dlpx100> snapshot
dlpx100 snapshot> list database=DBOMSRB331B3
NAME                         CONTAINER     LATESTCHANGEPOINT.LOCATION  LATESTCHANGEPOINT.TIMESTAMP
'@2022-10-02T04:23:15.951Z'  DBOMSRB331B3  60060798                    2022-10-02T04:23:14.000Z
'@2022-10-02T06:00:56.705Z'  DBOMSRB331B3  60080365                    2022-10-02T06:00:54.000Z

In this scenario the provision will be performed using the snapshot identified as '@2022-10-02T04:23:15.951Z'.

  1. Move to the database provision context in the CLI and set the type of provision to be performed, in this case Oracle
dlpx100 snapshot> cd ..
dlpx100> database provision
dlpx100 database provision *> set type=OracleProvisionParameters
  1. Set the timeflowPointParameters properties type and snapshot to allow the VDB to be provisioned from the snapshot '@2022-10-02T04:23:15.951Z'
dlpx100 database provision *> set timeflowPointParameters.type=TimeflowPointSnapshot
dlpx100 database provision *> set timeflowPointParameters.snapshot='@2022-10-02T04:23:15.951Z'
  1. Set the name for the VDB that will appear in the Delphix UI
dlpx100 database provision *> set container.name=TESTRAC
  1. Set the group the VDB will be placed in the Delphix UI Datasets management screen.
dlpx100 database provision *> set container.group=Targets
  1. Identify the mount point the VDB NFS mounts are to be mounted against on the target host environment.
dlpx100 database provision *> set source.mountBase=/mnt/provision
  1. Set the Oracle VDB type to an Oracle Virtual Source (VDB).
dlpx100 database provision *> set source.type=OracleVirtualSource
  1. Configure autostart for the VDB.
dlpx100 database provision *> set source.allowAutoVDBRestartOnHostReboot=false
  1. 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.
dlpx100 database provision *> set sourceConfig.type=OracleRACConfig

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

dlpx100 database provision *> ls
Properties
    type: OracleProvisionParameters (*)
    container:
        type: OracleDatabaseContainer
        name: TESTRAC (*)
        description: (unset)
        diagnoseNoLoggingFaults: true
        group: Targets (*)
        performanceMode: DISABLED
        preProvisioningEnabled: false
        racMaxInstanceLag: 3
        sourcingPolicy: (unset)
    credential: (unset)
    masked: (unset)
    maskingJob: (unset)
    newDBID: (unset)
    openResetlogs: (unset)
    physicalStandby: (unset)
    source:
        type: OracleVirtualSource (*)
        name: (unset)
        allowAutoVDBRestartOnHostReboot: false (*)
        archivelogMode: (unset)
        config: (unset)
        configParams: (unset)
        configTemplate: (unset)
        customEnvVars: (unset)
        fileMappingRules: (unset)
        logCollectionEnabled: false
        mountBase: /mnt/provision (*)
        newDBID: false
        nodeListeners: (unset)
        operations: (unset)
        redoLogGroups: (unset)
        redoLogSizeInMB: (unset)
    sourceConfig:
        type: OracleRACConfig
        crsDatabaseName: (unset)
        databaseName: (required)
        environmentUser: (unset)
        instances: (required)
        linkingEnabled: true
        nonSysCredentials: (unset)
        nonSysUser: (unset)
        repository: (required)
        services: (unset)
        tdeKeystorePassword: (unset)
        uniqueName: (required)
    timeflowPointParameters:
        type: TimeflowPointSnapshot (*)
        snapshot: '@2022-10-02T04:23:15.951Z' (*)
    username: (unset)

Operations
defaults

All options displayed as required must be filled out prior to committing the provision attempt.

  1. Set the new VDB Oracle database name (parameter db_name) and the database unique name (parameter db_unique_name). In this case they will be the same value.
dlpx100 database provision *> set sourceConfig.databaseName=TESTRAC
dlpx100 database provision *> set sourceConfig.uniqueName=TESTRAC
  1. 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.
dlpx100 database provision *> set sourceConfig.repository=
cluster1/'/u01/app/oracle/product/19.0.0.0/dbhome_1'
co80src.dcol2.delphix.com/'/u01/app/oracle/product/19.7.0.0/dbhome_1'
co80tgt.dcol2.delphix.com/'/u01/app/oracle/product/19.7.0.0/dbhome_1'
racmbg326622/'/u01/app/oracle/product/19.0.0.0/dbhome_1'

dlpx100 database provision *> set sourceConfig.repository=cluster1/'/u01/app/oracle/product/19.0.0.0/dbhome_1'
  1. Configure the RAC instances for the new VDB
dlpx100 database provision *> edit sourceConfig.instances
  1. Add the First of the RAC instances to the configuration
dlpx100 database provision sourceConfig.instances *> add
dlpx100 database provision sourceConfig.instances 0 *> set instanceName=TESTRAC1
dlpx100 database provision sourceConfig.instances 0 *> set instanceNumber=1
dlpx100 database provision sourceConfig.instances 0 *> set node=racmbg326621
dlpx100 database provision sourceConfig.instances 0 *> ls
Properties
    type: OracleRACInstance (*)
    instanceName: TESTRAC1 (*)
    instanceNumber: 1 (*)
    node: racmbg326621 (*)
  1. Move up the context tree to configure the second instance
dlpx100 database provision sourceConfig.instances 0 *> back
dlpx100 database provision sourceConfig.instances *> ls
Properties
    0:
        type: OracleRACInstance (*)
        instanceName: TESTRAC1 (*)
        instanceNumber: 1 (*)
        node: racmbg326621 (*)

Use the "add" command to add an element to this array.
  1. Add the second instance
dlpx100 database provision sourceConfig.instances *> add
dlpx100 database provision sourceConfig.instances 1 *> set instanceName=TESTRAC2
dlpx100 database provision sourceConfig.instances 1 *> set instanceNumber=2
dlpx100 database provision sourceConfig.instances 1 *> set node=racmbg326622
dlpx100 database provision sourceConfig.instances 1 *> back
dlpx100 database provision sourceConfig.instances *> ls
Properties
    0:
        type: OracleRACInstance (*)
        instanceName: TESTRAC1 (*)
        instanceNumber: 1 (*)
        node: racmbg326621 (*)
    1:
        type: OracleRACInstance (*)
        instanceName: TESTRAC2 (*)
        instanceNumber: 2 (*)
        node: racmbg326622 (*)

Use the "add" command to add an element to this array.
  1. Move up the context tree to check the configuration settings prior to kicking off the provision.
dlpx100 database provision sourceConfig.instances *> back
  1. Check all the required settings are in place and the instances and the remainder of the configuration are correct.
dlpx100 database provision *> ls
Properties
    type: OracleProvisionParameters (*)
    container:
        type: OracleDatabaseContainer
        name: TESTRAC (*)
        description: (unset)
        diagnoseNoLoggingFaults: true
        group: Targets (*)
        performanceMode: DISABLED
        preProvisioningEnabled: false
        racMaxInstanceLag: 3
        sourcingPolicy: (unset)
    credential: (unset)
    masked: (unset)
    maskingJob: (unset)
    newDBID: (unset)
    openResetlogs: (unset)
    physicalStandby: (unset)
    source:
        type: OracleVirtualSource (*)
        name: (unset)
        allowAutoVDBRestartOnHostReboot: false (*)
        archivelogMode: (unset)
        config: (unset)
        configParams: (unset)
        configTemplate: (unset)
        customEnvVars: (unset)
        fileMappingRules: (unset)
        logCollectionEnabled: false
        mountBase: /mnt/provision (*)
        newDBID: false
        nodeListeners: (unset)
        operations: (unset)
        redoLogGroups: (unset)
        redoLogSizeInMB: (unset)
    sourceConfig:
        type: OracleRACConfig
        crsDatabaseName: (unset)
        databaseName: TESTRAC (*)
        environmentUser: (unset)
        instances:
            0:
                type: OracleRACInstance (*)
                instanceName: TESTRAC1 (*)
                instanceNumber: 1 (*)
                node: racmbg326621 (*)
            1:
                type: OracleRACInstance (*)
                instanceName: TESTRAC2 (*)
                instanceNumber: 2 (*)
                node: racmbg326622 (*)
        linkingEnabled: true
        nonSysCredentials: (unset)
        nonSysUser: (unset)
        repository: cluster1/'/u01/app/oracle/product/19.0.0.0/dbhome_1' (*)
        services: (unset)
        tdeKeystorePassword: (unset)
        uniqueName: TESTRAC (*)
    timeflowPointParameters:
        type: TimeflowPointSnapshot (*)
        snapshot: '@2022-10-02T04:23:15.951Z' (*)
    username: (unset)

Operations
defaults
  1. Start the provision attempt by comitting the settings in the CLI
dlpx100 database provision *> commit
    TESTRAC
    Dispatched job JOB-1349
    DB_PROVISION job started for "Targets/TESTRAC".
    Starting provision of the virtual database "TESTRAC".
    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.
    Creating control file.
    Recovering Oracle database with created control file. 2 archive logs are required with 8 KB of redo to be applied.
    Opening the virtual database "TESTRAC".
    Starting incomplete recovery.
    Creating Oracle online logs.
    Processing startup init file.
    Configuring initialization and server parameter files.
    Mounting virtual database instance.
    Opening Oracle database.
    Creating tempfiles.
    Renaming readonly datafiles.
    Enabling Oracle instances.
    Registering listeners.
    Oracle recovery was successful.
    Unmounting read-only archive log filesystem for the virtual database instance "1".
    The virtual database "TESTRAC" was successfully provisioned.
    DB_PROVISION job for "Targets/TESTRAC" completed successfully.