CLI cookbook: provisioning a single instance non-multitenant Oracle VDB
This topic describes how to provision a single instance non-multitenant Oracle VDB using the Delphix Engine command-line interface.
Prerequisites
You will need the following information:
The name of the VDB you want to create
The group in which to create the VDB
The Oracle database name
The Oracle database unique name
The Oracle database instance number
The Oracle database instance name
The source dSource or VDB from which you wish to provision. This will be referenced as the "container" in the "defaults" command below.
The semanticLocation, SCN, or timestamp of the point you want to provision from. You can run these commands to get the list of snapshots or Timeflow ranges:
ACTIONSCRIPT3snapshot list database=dexampletimeflow "dexample" timeflowRanges; commitThe base mount point on the target server where VDB data should be mounted
The source repository (oracle install) in which to create the VDB. These can be listed with the
/repository listcommand.If you are using a VDB template, the name of the template to use.
Procedure
Execute the
database provisioncommand.ACTIONSCRIPT3delphix> database provisionExecute the
defaultscommand. Once you commit this command, it will return a partially constructed provision parameters object.ACTIONSCRIPT3delphix database provision> defaultsSet the Timeflow point source Timeflow and location.
ACTIONSCRIPT3delphix database provision defaults *> set type=TimeflowPointSemanticdelphix database provision defaults *> set container=dexampledelphix database provision defaults *> set location=LATEST_SNAPSHOTCommit the operation to populate the defaults, as provided by the browser interface. At this point, the operation can be committed, though you will likely need to change the defaults to match the information.
ACTIONSCRIPT3delphix database provision defaults *> commitSet the name and group for the new VDB
ACTIONSCRIPT3delphix database provision *> set container.name=vexampledelphix database provision *> set container.group=""Set the base mount point.
ACTIONSCRIPT3delphix database provision *> set source.mountBase=/mntSet the source config type to be a single instance non-multitenant Oracle, and set the database name and database unique name. When provisioning from a RAC or single instance non-multitenant oracle source, the default type will match that of the repository selected by the defaults operation.
ACTIONSCRIPT3delphix database provision *> set sourceConfig.type=OracleSIConfigdelphix database provision *> set sourceConfig.databaseName=vexampledelphix database provision *> set sourceConfig.uniqueName=vexample123Set the instance name and number.
ACTIONSCRIPT3delphix database provision *> edit sourceConfig.instancedelphix database provision sourceConfig.instance *> set instanceNumber=1delphix database provision sourceConfig.instance *> set instanceName=vexampledelphix database provision sourceConfig.instance *> backSet the target repository.
ACTIONSCRIPT3delphix database provision *> set sourceConfig.repository='/env/opt/oracle'Configure the Oracle database parameters. If you are using manually specified parameters, you can set the contents of
source.configParams. If you want to use a template, you can setsource.configTemplate.(Optional) Configure customer environment variables.
Setting Environment Pair ValuesCODEdelphix database provision *> edit customEnvVarsdelphix database provision source.customEnvVars *> adddelphix database provision source.customEnvVars 0 *> set type=OracleCustomEnvVarSIPairdelphix database provision source.customEnvVars 0 *> set varName=MYVAR1delphix database provision source.customEnvVars 0 *> set varValue=Value1delphix database provision source.customEnvVars 0 *> backdelphix database provision source.customEnvVars 1 *> set type=OracleCustomEnvVarSIPairdelphix database provision source.customEnvVars 1 *> set varName=MYVAR2delphix database provision source.customEnvVars 1 *> set varValue=Value2delphix database provision source.customEnvVars 1 *> back
Note:
1. OracleCustomEnvVarSIFile file should be in the following format.CODEexport VARNAME1=VARVALUE1export VARNAME2=VARVALUE22. When provisioning to a RAC target, use the type as OracleCustomEnvVarRACPair or OracleCustomEnvVarRACFile.
CODEdelphix database provision source.customEnvVars 0 *> set type=OracleCustomEnvVarRACPairdelphix database provision source.customEnvVars 0 *> set clusterNode=targetnode1delphix database provision source.customEnvVars 0 *> set varName=MYVAR1delphix database provision source.customEnvVars 0 *> set varValue=Value1delphix database provision source.customEnvVars 0 *> back
Commit the result.
delphix database provision *> commit