Applicable Delphix Versions
All Sub Releases
188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124,126.96.36.199
After examining this how-to you will have the steps, configuration options and a process for performing the provisioning of an Oracle virtual PDB (VPDB) using the Delphix Command Line Interface (CLI).
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 188.8.131.52 releases and above of Oracle the article is relevant to these release only. The Delphix Command Line Interface also changes across releases and the release of the engine used to perform the virtual PDB provision example here is a 5.1.0.X release of Delphix and the CLI commands used are applicable to 5.1 releases of Delphix.
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 and also be linked to Delphix.
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 will also create a temporary container database on the target host which will be used to establish the virtualised copy of the dSource PDB "pdborcl". This temporary CDB will be created and running during the provision process, it will be destroyed at the end of the provision of the virtual PDB.
Provisioning the Virtual PDB
- Log into the Delphix command line interface using the delphix_admin user or a user with delphix_admin privileges.
$ ssh delphix_admin@YOUR_ENGINE
- Move to the database provisioning command line object.
delphix> database provision
- Set the type of provision to perform, for Oracle virtual database (VDB) - VDB/VPDB's the type will be OracleVirtualSource
delphix database provision *> set source.type=OracleVirtualSource
- 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
- Set the destination mount point which Delphix NFS mounts are to linked under for 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"
- Set the login details for the provision and Delphix OS user who is to perform the provision
delphix database provision *> set username=delphix delphix database provision *> set credential.type=PasswordCredential delphix database provision *> set credential.password=delphix
- Give the dataset a name as it is to appear in the Delphix GUI
delphix database provision *> set container.name=PDBS2
- Place the new dataset in a Group that appears in the Delphix GUI, in this case the targets group.
delphix database provision *> set container.group=Targets
- Should a new DBID be required for the new VPDB enable newDBID.
delphix database provision *> set newDBID=true
- If automatically restarting the VDB is not required after a reboot of the VDB target host is not required 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
- Supply the destination container database name.
- This will be where the virtual PDB will ultimately be placed and run from on the target host.
delphix database provision *> set sourceConfig.cdbConfig=cdbstage
- Name the virtual PDB. This is what it will appear as in the destination container database.
delphix database provision *> set sourceConfig.databaseName=pdbs2
- Supply the details dSource PDB's 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
- Check that all the settings you require are in place using the "ls" command.
delphix database provision *> ls Properties 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 (*) Operations defaults
- 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.
Managing Oracle Environments in Delphix.
Oracle Container Database Administration - also known as multi-tenant databases.