CLI provisioning example, including hook script

By Kate Johnson posted 07-14-2016 10:27:31 PM

This example in either Delphix's 5.x documentation or on this community forum with these details would have been helpful for me, so I'm posting my example now.  It is ran in bash and you can (and should) parameterize as much s possible. Source DB is D01M, target vdb is D01G, target host is bocorad111 and coupled with the database version comprises the repository.  Your templates/mountBase, etc will be different as well.  And I will eventually store the appropriate value in .ssh/authorized_keys so a password will not be prompted. 
database provision; set; set"DEV(M-KJ)"; set newDBID=true; set source.type=OracleVirtualSource; set source.archivelogMode=false; set source.configTemplate=X01init.ora; set source.mountBase=/delphix; set sourceConfig.type=OracleSIConfig; set sourceConfig.databaseName=D01G; set sourceConfig.instance.type=OracleInstance; set sourceConfig.instance.instanceName=D01G; set sourceConfig.instance.instanceNumber=1; set sourceConfig.repository="bocorad111/'/u01/app/oracle/product/"; set sourceConfig.uniqueName=D01G; set timeflowPointParameters.type=TimeflowPointSemantic; set timeflowPointParameters.container=D01M; set timeflowPointParameters.location=LATEST_SNAPSHOT; set source.operations.configureClone.0.type=RunBashOnSourceOperation; set source.operations.configureClone.0.command="cd /home/delphixos/clone; /bin/bash D01G > fix_post_scrub_D01G.out 2>&1;"; commit;

    Dispatched job JOB-24013
    DB_PROVISION job started for "DEV(M-KJ)/D01G".
    Starting provision of the virtual database "D01G".
    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.
    Opening the virtual database "D01G".
    Opening Oracle database.
    Oracle recovery was successful.
    Unmounting read-only archive log filesystem for the virtual database instance "1".
    The virtual database "D01G" was successfully provisioned.
    Generating scripts for virtual database "D01G".
    Pushing scripts to virtual database "D01G".
    Add new online redo log files to virtual database "D01G".
    Running user-specified "Configure Clone" operations.
    DB_PROVISION job for "DEV(M-KJ)/D01G" completed successfully.
1 comment


07-14-2016 10:31:14 PM

Great job, Kate.