Skip to main content
Skip table of contents

CLI cookbook: provisioning a virtual PDB in a target CDB

This topic describes how to provision a virtual pluggable database (vPDB) using the command-line interface.

This process applies to Oracle container databases (CDBs) and the pluggable databases (PDBs) found within them that have been linked to Delphix as dSources. As container databases can only be found in Oracle releases and above of Oracle this topic is relevant to only these releases.


Provisioning of virtual PDB's in Delphix is dependent on the following entities being in place prior to attempting the creation of this type of Delphix dataset.

  • A source container database must be linked to the engine.

  • The source container database must have pluggable databases within it linked as dSources to Delphix.

  • A destination container database of the same Oracle release as the source database must exist in the target host. If this container database is a physical database, then it must be linked to Delphix. If it’s a virtual container database, then it must be of Oracle version or later.

In the example CLI provision detailed below the following databases are in place:

  • The source container database is called "cdb12"

  • The destination container database is called "cdbstage"

  • The pluggable database found in "cdb12" that has been linked as a dSource is called "pdborcl"

  • The destination virtual pluggable database will be called "pdbs2" and run from container database "cdbstage"

Delphix creates a temporary container database on the target host which will be used to establish the virtualized copy of the dSource PDB "pdborcl". This temporary CDB will be created and running during the provisioning process, it will be destroyed at the end of the provision of the virtual PDB.


  1. Log into the Delphix command-line interface using the admin user or a user with admin privileges.

    $ ssh admin@YOUR_ENGINE
  2. Set the type of provision to perform, for Oracle virtual database (VDB) - VDB/vPDBs, the type will be OracleVirtualSource.

    set source.type=OracleVirtualPdbSource
  3. Set the destination target environment/host through setting the sourceConfig environment user to perform the provision. A destination container database must already be running on this target host.

    delphix database provision *> set sourceConfig.environmentUser=OEL6SIN1/delphix
  4. Set the destination mount point which Delphix NFS mounts are to be linked to under the virtual PDB. This folder must exist at a file system level on the target host. Do not use single quotes around the mount path.

    delphix database provision *> set source.mountBase="/mnt/provision"
  5. Set the login details for the provision and Delphix OS user who is to perform the provision.

    delphix database provision *> set username=delphixdelphix database provision *> set credential.type=PasswordCredentialdelphix database provision *> set credential.password=delphix
  6. Give the dataset a name.

    delphix database provision *> set
  7. Place the new dataset in a Group that appears in the Delphix GUI, in this case, the target group.

    delphix database provision *> set
  8. If automatically restarting the VDB is not required after a reboot of the VDB target host, set this to option to false. False is possibly a better option given the container database would need to be running prior to any attempt to pull up a vPDB.

    delphix database provision *> set source.allowAutoVDBRestartOnHostReboot=false
  9. Supply the destination container database name. This will be where the vPDB will ultimately be placed and run from on the target host.

    delphix database provision *> set sourceConfig.cdbConfig=cdbstage
  10. Name the vPDB. This is what it will appear as in the destination container database.

    delphix database provision *> set sourceConfig.databaseName=pdbs2
  11. Supply the dSource PDBs details. In this example, the provision will use the latest point in time available to the dSource PDB as the point in time from which to provision the vPDB. Setting a different timeflowPointParameters.type would allow you to use points in time other than the latest snapshot or latest point in time if this is what you desire. Using other types is not covered in this example.

    delphix database provision *> set timeflowPointParameters.container=PDBORCL
  12. Check that all the settings you require are in place using the "ls" command.

    delphix database provision *> lsProperties  type: OracleProvisionParameters  container:    type: OracleDatabaseContainer    name: PDBS2 (*)    description: (unset)    diagnoseNoLoggingFaults: true    group: Targets (*)    performanceMode: DISABLED    preProvisioningEnabled: false    sourcingPolicy: (unset)  credential:    type: PasswordCredential (*)    password: ******** (*)  maskingJob: (unset)  newDBID: true (*)  openResetlogs: true  physicalStandby: false  source:    type: OracleVirtualSource (*)    name: (unset)    allowAutoVDBRestartOnHostReboot: false (*)    archivelogMode: true    config: (unset)    configParams: (unset)    configTemplate: (unset)    customEnvVars: (unset)    fileMappingRules: (unset)    manualProvisioning: false    mountBase: /mnt/provision (*)    nodeListenerList: (unset)    operations: (unset)    redoLogGroups: 3    redoLogSizeInMB: 0  sourceConfig:    type: OraclePDBConfig    cdbConfig: cdbstage (*)    databaseName: pdbs2 (*)    environmentUser: (unset)    linkingEnabled: true    repository: (unset)    services: (unset)  timeflowPointParameters:    type: TimeflowPointSemantic    container: PDBORCL (*)    location: LATEST_POINT  username: delphix (*)  Operationsdefaults
  13. Initiate the provision by committing the operation in the CLI.

    delphix database provision *> commit  PDBS2  Dispatched job JOB-333  DB_PROVISION job started for "Targets/PDBS2".  Starting provision of the virtual database "pdbs2".  Preparing multitenant container database "cdbstage".  Creating new TimeFlow.  Generating recovery scripts.  Exporting storage.  Mounting filesystems to recover pluggable database on instance "1".  Mounting read-only archive log filesystem for the virtual database instance "1".  Recovering Oracle pluggable database.  Mounting filesystems for the virtual database instance "1".  Unmounting filesystems after recovering pluggable database on instance "1".  Cleaning up objects created by pluggable database provisioning.  Opening Oracle pluggable database.  DB_PROVISION job for "Targets/PDBS2" completed successfully.
JavaScript errors detected

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

If this problem persists, please contact our support.