Tip of the Day: Using the CLI to Provision an Oracle VDB

  • 1
  • Announcement
  • Updated 2 years ago
  • (Edited)
For those of you using CLI (Command Line Interface) provisioning an VDB can be done in a few steps.

*Note this is for single instance Oracle VDBs

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
  • 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:

    snapshot list database=dexampletimeflow "dexample" timeflowRanges; commit
  • The base mountpoint 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 list command.

  • If you are using a VDB template, the name of the template to use. See the Customizing VDB Configuration Settings topic for information on how templates affect configuration parameters on refresh.
Procedure
1. Execute the database 
provisioncommand
            delphix> database provision
2. Execute the defaultscommand
            delphix database provision> defaults
3. Set the timeflow point source timeflow location
            delphix database provision defaults *> set type= TimeflowPointSemantic
            delphix database provision defaults *> set container=dexample
            delphix database provision defaults *> set locations=LATEST_SNAPSHOT
4. Commit the operation to populate the defaults, as provided by the browser interface. At this point, the operation can be committed, though you will liekly need to change the defaults to match the infromation
            delphix database provision defaults *> commit
5. Set the name and group for the new VDB
            delphix database provision *> set container.name=vexample
            
delphix database provision *> set scontainer.group="<New Group>"
6. Set the base mountpoint
           
delphix database provision *> set source.mountBase=/mnt
7. Set the source config type to be single instance Oracle, and set the database name and database unique name. When provisioning from a RAC or single instance oracle source, the default type will match that of the repository selected by the defaults operation.
            
delphix database provision *> set sourceConfig.type=OracleSIConfig
            delphix database provision *> set source Config.databaseName=vexample
            delphix database provision *> set source Config.uniqueName=vexample123
8. Set the instance name and number
            
delphix database provision *> exit sourceConfig.instance
            delphix database provision sourceConfig.instance *> set instanceNumber=1
            delphix database provision sourceConfig.instance *> set instanceName=vexample
            delphix database provision sourceConfig.instance *> back
9. Set the target repository
            
delphix database provision  *> set sourceConfig.repository=env/'/opt/oracle'
10. 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 set source.configTemplate
           
delphix database provision  *> set source.configTemplate=exampleTemplate
11. Commit the result
           delphix database provision  *>commit
 
    Photo of Delphix FAQs

    Delphix FAQs, Official Rep

    • 4,000 Points 4k badge 2x thumb

    Posted 5 years ago

    • 1
    Can you provide an addendum to this CLI provisioning example to include a hook script for configureClone, where the command is "ls -la" and then the next command is "echo hello" ?  (2 commands total)