Procedure for Provisioning a Pluggable Database Using a Snapshot Profile

To provision a PDB using a snapshot profile, follow these steps:

  1. Log in to EM CLI by running the following command on the OMS host:
    $<OMS_HOME>/bin/emcli login -username=<name_of_user> -password=<password>
    
  2. View the help file of the create_pluggable_database verb by running the following command:
    $<OMS_HOME>/bin/emcli help create_pluggable_database
    
  3. Run the create_pluggable_database verb, specifying the -sourceType parameter as CLONE, and the -sourcePDBName, sourceCDBCreds, -useSnapClone, -sourceCDBHostCreds, -mountPointPrefix, -writableSpace, -privHostCreds, -saveProfile, -profileName, and -profileLocation parameters, to create a snap clone and a snapshot profile of the source PDB:
    $<OMS_HOME>/bin/emcli create_pluggable_database
    -cdbTargetName=<Specify the CDB target name for creating new PDB>
    -cdbTargetType=<Specify the CDB target type - oracle_database, rac_database>
    -cdbHostCreds=<Specify the host credentials on which the CDB target is located>
    -pdbName=<Specify a name for the new PDB>
    -sourceType=CLONE
    -sourcePDBName=<Specify the name of the existing PDB that you want to clone>
    -sourceCDBCreds=<Specify the credentials of the CDB within which the source PDB is present>
    -useSnapClone
    -sourceCDBHostCreds=<Specify the host credentials for the source CDB.>
    -mountPointPrefix=<Specify the mount point prefix for the cloned volumes.>
    -writableSpace=<Specify the writable space, in GB, for the cloned volumes.>
    -privHostCreds=<Specify the privileged host credentials required to mount the cloned volumes at the specified locations.>
    -saveProfile
    -profileName=<The name of the profile that you want to create>
    -profileLocation=<The location in software library where you want to create the profile>
    [-cdbTargetCreds=<Specify the credentials of container database on which the new PDB will be created.>]
    [-numOfPdbs=<Specify the number of PDBs to be created>]
    [-pdbAdminCreds=<Specify the PDB credentials having the admin role>]
    [-useOMF=<Specifies that the datafiles can be stored in OMF location>]
    [-sameAsSource=<Specifies that the datafiles of new PDB can be stored in the same location as that of source CDB>]
    [-newPDBFileLocation=<Specify the storage location for datafiles of the created PDB.>]
    [-noUserTablespace=<Specifies that the new DEFAULT PDB will not be created with USERS tablespace.>]
    
    

    This command clones the source PDB using the Snap Clone feature, and creates a snapshot profile of the source PDB, which is stored at the specified location in Software Library.

  4. Run the list_swlib_entities verb, specifying the -name and the -show_entity_rev_id parameters, to obtain the Uniform Resource Name (URN) of the created snapshot profile:
    $<OMS_HOME>/bin/emcli list_swlib_entities
                          -name="<The name of the snapshot profile>"
                          -show_entity_rev_id 
    
    
  5. Run the create_pluggable_database verb, specifying the -sourceType parameter as PROFILE, and the -profileURN parameter, to provision PDBs using the created snapshot profile:
    $<OMS_HOME>/bin/emcli create_pluggable_database
    -cdbTargetName=<Specify the CDB target name for creating new PDB>
    -cdbTargetType=<Specify the CDB target type - oracle_database, rac_database>
    -cdbHostCreds=<Specify the host credentials on which the CDB target is located>
    -pdbName=<Specify a name for the new PDB>
    -sourceType=PROFILE
    -profileURN=<URN of the snapshot profile that you want to use to provision PDBs>
    [-cdbTargetCreds=<Specify the credentials of container database on which the new PDB will be created.>]
    [-numOfPdbs=<Specify the number of PDBs to be created>]
    [-pdbAdminCreds=<Name of pdb credentials with admin role>]
    [-useOMF=<Specifies that the datafiles can be stored in OMF location>]
    [-sameAsSource=<Specifies that the datafiles of new PDB can be stored in the same location as that of source CDB>]
    [-newPDBFileLocation=<Specify the storage location for datafiles of the created PDB.>]
    [-noUserTablespace=<Specifies that the new DEFAULT PDB will not be created with USERS tablespace.>]