47 EM CLI Verbs for Database as a Service Administrator

This chapter provides details on the Enterprise Manager Command Line Interface (EM CLI) verbs for Enterprise Manager Self Service Applications administration users for Database as a Service (DBaaS). For other EM CLI verbs related to cloud administration see Enterprise Manager Command Line Interface Guide.

The EM CLI enables you to access Enterprise Manager Cloud Control functionality from text-based consoles (shells and command windows) for a variety of operating systems. You can call Enterprise Manager functionality using custom scripts, such as SQL*Plus, OS shell, Perl, or Tcl, thus easily integrating Enterprise Manager Functionality with a company's business process.

The following sections are covered in this chapter:

All PaaS infrastructure zone EM CLI operations are available only to users with a EM_CLOUD_ADMINISTRATOR role and Software pool operations are available only to users with a EM_SSA_ADMINISTRATOR role. EM CLI verbs will obtain user information from the security context and grant permission only those users authorized to perform these operations.

47.1 PaaS Zone EM CLI Verbs

The following table provides details of the supported verbs for the PaaS zone resource.

Table 47-1 Paas Zone EM CLI Verbs

Verb Description Format

emcli create_paas_zone

Creates a PaaS infrastructure zone.

  • name - Name of the PaaS infrastructure zone to be created.

  • credential - Global named credentials to be used for provisioning in this PaaS infrastructure zone.

  • hosts - Comma separated list of the host targets to be added as members of this Paas infrastructure zone. PaaS infrastructure zone can contain either hosts or Oracle VM zones as members.

  • ovm_zones - Comma separated list of the Oracle VM zone targets to be added as members of this Paas infrastructure zone.

  • roles - Comma separated list of SSA roles that can access this PaaS infrastructure zone.

  • description - Description of the PaaS infrastructure zone.

  • cpu_utilization - This placement policy constraint allows the cloud administrator to set maximum thresholds for any host. Value entered must be between 1 and 100. If not provided, the default value is taken to be 80 percent. This parameter is not needed if Oracle VM zone targets are added as members.

  • memory_utilization - This is a placement policy constraint for the PaaS infrastructure zone. The value entered must be between 1 and 100. If it is not provided, the default value is taken to be 80 percent. This parameter is not needed if Oracle VM zone targets are added as members.

Example:

emcli create_paas_zone 
   -name=MyPaaSZone 
   -credential=AIME__N 
   -hosts=xyxy.example.com 
   -roles="SSA_USER_ROLE1" 
   -description="Test PaaS zone" 
   -cpu_utilization=90 
   -memory_utilization=90

Sample Output:
PaaS Infrastructure Zone "MyPaaSZone" created successfully.

emcli create_paas_zone

-name=<Name of PaaS zone>

-credential=<Global Named Credential>

[-hosts=<Host1,Host2,Host3...>]

[-ovm_zones=<OVMZone1,OVMZone2,OVMZone3...>]

[-roles=<SsaRole1,SsaRole2,...>]

[-description=<Description of PaaS zone>]

[-cpu_utilization=<Value between 1 and 100>]

[-memory_utilization=<Value between 1 and 100>]

emcli update_paas_zone

Updates a PaaS infrastructure zone.

  • name - Name of the existing PaaS infrastructure zone.

  • credential - Global named credentials to be updated.

  • add_hosts - Comma separated list of the host targets to be added as members of the Paas infrastructure zone. The hosts to be added should not have been added to other existing PaaS zones.

  • remove_hosts - Comma separated list of the host targets to be removed from the Paas infrastructure zone.

  • add_ovm_zones - Comma separated list of the Oracle VM zone targets to be added as members of the Paas infrastructure zone. The Oracle VM zones to be added should not have been added to other existing PaaS zones.

  • remove_ovm_zones - Comma separated list of the Oracle VM zone targets to be removed from the Paas infrastructure zone.

  • add_roles - Comma separated list of SSA roles to be added that can access the PaaS infrastructure zone.

  • remove_roles - Comma separated list of SSA roles to be removed from the PaaS infrastructure zone.

  • description - Updated description of the PaaS infrastructure zone.

  • cpu_utilization - This placement policy constraint allows the cloud administrator to set maximum thresholds for any host. The value entered must be between 1 and 100.

  • memory_utilization - This placement policy constraint is for the memory utilization of the PaaS infrastructure zone. The value entered must be between 1 and 100.

Example:

emcli update_paas_zone 
    -name=MyPaaSZone 
    -credential=AIME_N 
    -add_hosts=xyxy.example.com  
    -remove_hosts=xxy.example.com 
    -add_roles="SSA_USER_ROLE1"  
    -remove_roles="SSA_USER_ROLE2" 
    -description="Test PaaS zone" 
    -cpu_utilization=90 
    -memory_utilization=90 

Sample Output:
PaaS Infrastructure Zone "MyPaaSZone" updated successfully. 

emcli update_paas_zone

-name=<Name of PaaS zone>

[-description=<Description of PaaS zone>]

[-credential=<Global Named Credential>]

[-add_hosts=<Host1,Host2,Host3...>]

[-remove_hosts=<Host4,Host5...>]

[-add_ovm_zones=<OVMZone1,OVMZone2,OVMZone3...>]

[-remove_ovm_zones=<OVMZone4,OVMZone5...>]

[-add_roles=<SsaRole1,SsaRole2,...>]

[-remove_roles=<SsaRole3,SsaRole4,...>]

[-cpu_utilization=<Value between 1 and 100>]

[-memory_utilization=<Value between 1 and 100>]

emcli delete_paas_zone

Deletes a PaaS infrastructure zone. The PaaS infrastructure zone cannot be deleted if there is an existing Software pool associated with it.

  • name - Name of the existing PaaS infrastructure zone to be deleted.

Example:

emcli delete_paas_zone 
       -name=MyPaaSZone 

Sample Output:
PaaS Infrastructure Zone "MyPaaSZone" deleted successfully

emcli delete_paas_zone

-name=<Name of PaaS zone>

emcli get_paas_zone_detail

Retrieves the PaaS infrastructure zone details.

  • name - Details of the existing PaaS infrastructure zone, such as Name, Description, Named Credentials, Number of Hosts, Roles, Maximum Memory Allocation (%), and Maximum CPU Utilization (%).

Example:

emcli  get_paas_zone_detail 
    -name=MyPaaSZone

Sample Output:
Name               MyPaaSZone
Description        TEST zone
Named Credentials  AIME_N
Number of Hosts    1
Roles              SSA_USER_ROLE1
Maximum Memory Allocation (%)    90
Maximum CPU Utilization (%)      90

emcli get_paas_zone_detail

-name=<Name of PaaS zone>


47.2 Software Pool EM CLI Verbs

The following table provides details of the supported verbs for the Software pool resource.

Table 47-2 Software Pool EM CLI Verbs

Verb Description Format

emcli create_pool

Creates a database, schema, or pluggable database pool.

  • name - Name of the Software pool to be created.

  • target_type - Target type of the Software pool to be created. For example: mwaas_zone for middleware pool, oracle_cloud_zone for database pool, and schaas_pool for schema pool.

  • paas_zone - Name of PaaS infrastructure zone in which the Software pool is to be created.

  • members - Comma separated list of targets to be added as members of the Software pool.

  • description - Description of the Software pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the database pool in terms of resource consumption. Use the get_pool_allowed_placement_constraints verb to get the available placement constraints for a pool target type.

  • member_constraints - Comma separated key value pairs that restricts the addition of member targets to a software pool with a set criteria. Use to the get_pool_allowed_member_constraints verb to get the available member constraints and their possible values for a pool target type.

  • properties - Comma separated key value pairs for additional properties that need to be specified based on the software pool target type.

Note:

  • To procure the GUID run the following command:

    emcli get_procedures
    [-type={procedure type}]
    
    Sample command:
    emcli get_procedures -type=DBPROV
    
  • Root credentials are optional. They are required if you want to use the pool for snap cloned database requests.

  • Grid Infrastructure credentials are optional. They are required if you are creating only a RAC database.

  • ASM credentials are optional. They are required if you want to use the database pool for live cloning of a database using ASM.

  • An existing pool with similar configuration can be associated to the new database pool as a standby pool. To do so use the standby_pools property. To associate multiple pools the pool names should be separated using the pipe symbol.

Examples:

  • Database pool -

    emcli  create_pool
        -name=MyDbPool
        -target_type=oracle_cloud_zone
        -paas_zone=MyPaaSZone
        -members=OraDb11g_home1_1_slc03qtn
        -description="Test Database Pool"
        -member_constraints= 
          "CONFIGURATION=oracle_database, 
           VERSION=11.2.0.2.0, 
           PLATFORM=226"
        -placement_constraints= 
           "MAX_INSTANCES=7"
        -properties= 
    "host_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    root_credential_guid=DBA449B8967AAF77E040F00A73B11F55"
    grid_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    asm_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    standby_pools=DB_POOL1|DB_POOL2
    Sample Output:
    Software Pool "MyDbPool" created successfully.
    
  • Schema pool -

    emcli  create_pool
        -name= MySchemaPool
        -target_type= schaas_pool
        -paas_zone=MyPaaSZone
        -members= simple.us.example.com
        -description="Test Schema Pool"
        -member_constraints= 
          " TARGET_TYPE=oracle_database, 
           VERSION=11.2.0.2.0, 
           PLATFORM=226"
        -placement_constraints= 
           "MAX_SERVICES=7,
            USE_WORKLOAD=true,  
            MAX_CPU_USAGE=90, 
            MAX_MEMORY_USAGE=90, 
            ENFORCE_CPU=true"
        -properties= 
    "host_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    database_credential_guid =DBA449B8967AAF77E040F00A73B11F55"
    
    Sample Output:
    Software Pool "MySchemaPool" created successfully.
    
  • Pluggable database pool -

    emcli  create_pool
        -name= MyPdbPool
        -target_type= pdbaas_pool
        -paas_zone=MyPaaSZone
        -members= database
        -description="Test PDB Pool"
        -member_constraints= 
          TARGET_TYPE_CDB=oracle_database, 
          VERSION_CDB=12.1.0.1.0, 
          PLATFORM_CDB=226"
        -placement_constraints= 
            "MAX_PDB_SERVICES=7, 
            PDBS_USE_WORKLOAD=true, 
            MAX_CPU_USAGE_BY_PDBS=90,  
            MAX_MEMORY_USAGE_BY_PDBS=90, 
            PDBS_ENFORCE_CPU=true"
        -properties= 
    "host_credential_guid=DBA449B8967AAF77E040F00A73B11F55, gi_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    cdb_credential_guid =DBA449B8967AAF77E040F00A73B11F55"
    
    Sample Output:
    Software Pool "MySchemaPool" created successfully
    

emcli create_pool

-name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

-paas_zone=<PaaS Infrastructure Zone of Software Pool>

-members=<Member1, Member2...>

[-description=<Description of Software Pool>]

[-placement_constraints=<constraint1=value1, constraint2=value2...>]

[-member_constraints=<constraint1=value1, constraint2=value2>]

[-properties=<property1=value1, property2=value2>]

emcli update_pool

Updates a a database, schema, or pluggable database pool (whichever specified).

  • name - Name of the existing Software pool.

  • target_type - Target type of the existing Software pool. For example: mwaas_zone for middleware pool, oracle_cloud_zone for database pool, and schaas_pool for schema pool.

  • description - Description of the Software pool.

  • add_members - Comma separated list of targets to be added as members of the Software pool. The targets to be added must satisfy the member constraints of the Software pool.

  • remove_members - Member targets to be removed from the Software pool.

  • placement_constraints - Comma separated key value pairs of the placement constraints that allow the self service administrator to set maximum ceilings for resource utilization. This provides protection for the members of the Software pool in terms of resource consumption.

  • properties - Comma separated key value pairs for properties that need to be updated based on the Software pool target type.

Examples:

  • Database pool -

    emcli update_pool
        -name=MyDbPool
        -target_type=oracle_cloud_zone
        -paas_zone=MyPaaSZone
        -add_members=
              OraDb11g_home1_1_slc03qtn
        -remove_members= 
              OraDb11g_home1_2_slc01mdr
        -description="Test Database Pool"
        -placement_constraints= 
           "MAX_INSTANCES=7"
        -properties= 
    "host_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    root_credential_guid=DBA449B8967AAF77E040F00A73B11F55"
    
    Sample Output:
    Software Pool "MyDbPool" updated successfully. 
    
  • Schema pool -

    emcli update_pool
        -name= MySchemaPool
        -target_type= schaas_pool
        -add_members=
              simple.us.example.com
        -remove_members= 
              Simple1.us.example.com
        -description="Test Database Pool"
        -placement_constraints= 
           "MAX_SERVICES=17,
            USE_WORKLOAD=false,  
            MAX_CPU_USAGE=90,  
            MAX_MEMORY_USAGE=90, 
            ENFORCE_CPU=false"    
    
    Sample Output:
    Software Pool "MySchemaPool" updated successfully.y. 
    
  • Pluggable database pool -

    emcli update_pool
        -name= MyPdbPool
        -target_type= pdbaas_pool
        -paas_zone=MyPaaSZone
        -add_members=database
        -remove_members=database    
        -description="Test PDB Pool"
        -placement_constraints= 
            "MAX_PDB_SERVICES=7, 
            PDBS_USE_WORKLOAD=true, 
            MAX_CPU_USAGE_BY_PDBS=90,  
            MAX_MEMORY_USAGE_BY_PDBS=90, 
            PDBS_ENFORCE_CPU=true"
        -properties= 
    "host_credential_guid=DBA449B8967AAF77E040F00A73B11F55, gi_credential_guid=DBA449B8967AAF77E040F00A73B11F55,
    cdb_credential_guid =DBA449B8967AAF77E040F00A73B11F55"
    
    Sample Output:
    Software Pool "MyPdbPool" updated successfully. 
    

emcli update_pool -name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

[-description=<Description of Software Pool>]

[-add_members=<Member1, Member2...>]

[-remove_members=<Member4, Member5...>]

[-placement_constraints=<constraint1=value1,constraint2=value2...>]

[-properties=<property1=value1, property2=value2>]

emcli delete_pool

Deletes a database, scheme, or pluggable database pool. The software pool cannot be deleted if there is an existing Service template associated with it.

  • name - Name of an existing software pool.

  • target - Target type of the software pool.

Examples:

  • Database pool -

    emcli delete_pool
       -name=MyDbPool
       -target_type=oracle_cloud_zone       
    Sample Output:
    Software Pool "MyDbPool" deleted successfully.
    
  • Schema pool -

    emcli delete_pool
        -name=MySchemaPool
        -target_type= schaas_pool
    
    Sample Output:
    Software Pool "MySchemaPool" deleted successfully.
    
  • Pluggable database pool -

    emcli delete_pool
        -name= MyPdbPool
        -target_type= pdbaas_pool
    
    Sample Output:
    Software Pool "MyPdbPool" deleted successfully.
    

emcli delete_pool

-name=<Name of Software Pool>

-target_type=<Target type of Software Pool>

emcli get_pool_detail

Retrieves the software pool details, such as name, target type, description, PaaS infrastructure zone, number of members, placement constraints, and member constraints.

  • name - Name of the Software pool.

  • target - Target type of the Software pool

Examples:

  • Database pool -

    emcli get_pool_detail
        -name=MyDbPool
        -target_type=oracle_cloud_zone
    
    Sample Output:
    Name              MyDbPool
    Target Type       oracle_cloud_zone
    Description       Test Database Pool
    Paas Infrastructure Zone SLC01MDR_ZONE
    Number of Members               1
    Placement Constraints
     MAX_INSTANCES : 10
    Member Constraints
     CONFIGURATION : DatabaseInstance
     VERSION : 11.2.0.2.0 ,
     PLATFORM : Linux x86-64
    
  • Schema pool -

    emcli get_pool_detail
        -name=MySchemaPool
        -target_type= schaas_pool
    
    Sample Output:
    Name                MyRchemaPool
    Target Type         schaas_pool
    Description         Test Schema Pool
    Paas Infrastructure Zone   SLC01MDR_ZONE
    Number of Members   1
    Placement Constraints
     MAX_CPU_USAGE : 90 ,
     ENFORCE_CPU : false ,
     MAX_MEMORY_USAGE : 90 ,
     MAX_SERVICES : 17 ,
     USE_WORKLOAD : false
    Member Constraints
     VERSION : 11.2.0.2.0 ,
     PLATFORM : Linux x86-64 ,
     TARGET_TYPE : Database Instance
    
  • Pluggable database pool -

    emcli get_pool_detail
        -name= MyPdbPool
        -target_type= pdbaas_pool
    
    Sample Output:
    Name                 MyPdbPool
    Target Type          pdbaas_pool
    Description          Test PDB Pool
    Paas Infrastructure Zone  PDB_ZONE
    Number of Members     1
    Placement Constraints
     MAX_MEMORY_USAGE_BY_PDBS : 90 ,     
     MAX_CPU_USAGE_BY_PDBS : 90 , 
     MAX_PDB_SERVICES : 7 ,  
     PDBS_ENFORCE_CPU : false , 
       PDBS_USE_WORKLOAD :false                                                           
    Member Constraints              
     PLATFORM_CDB : Linux x86-64 ,  
     TARGET_TYPE_CDB : Database Instance,
     VERSION_CDB : 12.1.0.1.0
    

emcli get_pool_detail

-name=<Name of Software Pool>

-target_type=mwaas_zone


47.3 Database Quota EM CLI Verbs

The following table provides details of the supported verbs for Database quota.

Table 47-3 Database Quota Em CLI Verbs

Verb Description Format

emcli create_database_quota

Creates database quota for a EM_SSA_USER role.

  • role_name: Name of SSA user Role for which quota is to be created

  • databases: Number of database service requests allowed.

  • schema_services: Number of schema service requests allowed.

  • pluggable_databases: Number of pluggable database requests allowed.

  • memory: Amount of memory usage allowed.

  • storage: Amount of storage usage allowed.

Example

emcli create_dbaas_quota
           -role_name="My Role"
           -databases="10"
           -schema_services="10"
           -pluggable_databases="10"
           -memory="99"
           -storage="99"

Sample Output
Quota for "MyRole" setup successfully.

emcli create_dbaas_quota

-role_name="<Name of SSA User Role>"

-databases="<Number of Database Requests>"

-schema_services="<Number of Schema Service Requests>"

-pluggable_databases="<Number of Pluggable Database Service Requests>"

-memory="<Memory(GB)>"

-storage="<Storage(GB)>"

emcli update_dbaas_quota

Updates the database quota for the SSA user role.

  • role_name - Name of the SSA user role for which quota is to be updated.

  • databases - Number of database service requests allowed.

  • schema_services - Number of schema service requests allowed.

  • pluggable_databases - Number of PDB service requests allowed.

  • memory - Amount of memory usage allowed.

  • storage - Amount of storage space usage allowed.

Example

emcli update_dbaas_quota
        -role_name="My Role"
        -databases="10"
        -schema_services="10"
        -pluggable_databases="10"
        -memory="99"
        -storage="99"   

Sample Output   
Quota for "My Role" updated successfully. 

emcli update_dbaas_quota

-role_name="<Name of SSA User Role>"

-databases="<Number of Database Requests>"

-schema_services="<Number of Schema Service Requests>"

-pluggable_databases="<Number of Pluggable Database Service Requests>"

-memory="<Memory(GB)>"

-storage="<Storage(GB)>"

emcli delete_dbaas_quota

Deletes the database quota for a SSA User Role.

  • role_name - Name of the SSA user role for which quota is to be deleted.

Example

emcli delete_dbaas_quota           -role_name="My Role"

Sample Output
Quota for "My Role" deleted successfully.

emcli delete_dbaas_quota

-role_name="<Name of SSA User Role">

emcli get_dbaas_quota

Lists the database quota setup for SSA user roles.

Example

emcli get_dbaas_quota  
     
Sample Output:
ROLE_NAME: SSA_USER_ROLE1 NUMBER_OF_SCHEMA_SERVICES: 99
MEMORY: 99
STORAGE: 99
NUMBER_OF_PLUGGABLE_DATABASES: 99NUMBER_OF_DB_INSTANCES : 99

Quotas for Roles retrieved successfully

emcli get_dbaas_quota


47.4 Database Request Settings EM CLI Verbs

The following table provides details of the supported verbs for Database request settings.

Table 47-4 Database Request Settings EM CLI Verbs

Verb Description Format

emcli update_dbaas_request_settings

Updates the Database request settings.

  • future_reservation_length - The time duration before which a Self Service user can schedule a request.

  • maximum_archive_duration - The duration of time after which the ''Completed'', Self service create requests will be purged from the repository.

  • default_retirement_period - The maximum amount of time for which Self service user can retain a service instance.

Example:

emcli update_dbaas_request_settings
  -future_reservation_length="2 Months"
  -maximum_archive_duration="10 Weeks"
  -default_retirement_period="No Reservation"
Sample Output:
Request settings updated successfully

emcli update_dbaas_request_settings

-future_reservation_length="<Future Request Scheduling Period>"

-maximum_archive_duration="<Request Purging Duration>"

-default_retirement_period="<Default Retention Duration>"

emcli get_dbaas_request_settings

Retrieves the PaaS infrastructure zone details.

Example:

emcli get_dbaas_request_settings
Sample Output:
Future Reservation Length  : 2 Months
Maximum Archive Duration : 10 Weeks
Default Retirement Period : 1 Years
Request Settings retrieved successfully.

emcli get_dbaas_request_settings


47.5 Database Size EM CLI Verbs

The table below lists the supported verbs for Database size resource.

Table 47-5 Database Size EM CLI Verbs

Verb Description Format

emcli create_database_size

Specify one or more attributes that make up this database size. The different attributes are separated by a semicolon (;). Attributes specified in the database size override values specified in the service template

  • name- Create a name for the size.

  • description - Create a description for the size.

  • attributes - The different attributes are separated by a semicolon (;). Users can specify values for the following attributes:

    • cpu: Total number of CPU cores.

    • memory: Total maximum memory in GB.

    • processes: Total number of processes that can simultaneously connect to Oracle.

    • storage: Total storage that is allocated to Oracle (in GB).

Example:

emcli create_database_size -name=Small -description="Small size database" -attributes="cpu:4;storage:50;memory:4"
Sample Output:
Database size 'Small' has been successfully created.

emcli create_database_size

-name="<Size name>"

-description="<Size description>"

[-attributes="cpu:<number of cores>;

memory:<memory in GB>;

processes:<max number of processes>;

storage:<Total Storage in GB allocated to database>;"

]

emcli update_database_size

Specify one or more attributes that have to be modified. The different attributes are separated by a semicolon (;). If you want to remove an attribute from the database size definition, specify 'remove' against that attribute.

  • name - Name of the existing database.

  • description - Updates the description of the existing size.

  • attributes - The different attributes are separated by a semicolon (;). Users can specify values for the following attributes:

    • cpu: Total number of CPU cores.

    • memory: Total maximum memory in GB.

    • processes: Total number of processes that can simultaneously connect to Oracle.

    • storage: Total storage that is allocated to Oracle (in GB).

Example:

emcli update_database_size -name=Small -description="Small size database" -attributes="cpu:4;storage:50;memory:4"
Sample Output:
Database size 'Small' has been successfully updated.

emcli update_database_size

-name="<Existing size name>"

-description="<Size description>"

[-attributes="cpu:<number of cores>;

memory:<memory in GB>;

processes:<max number of processes>;

storage:<Total storage in GB allocated to database>;"]

emcli delete_database_size

Deletes database size.

name - Name of the existing database size.

Example:

emcli delete_database_size -name=small
Sample Output:
Database size 'Small' has been successfully deleted.

emcli delete_database_size

-name="<Existing size name>"

emcli list_database_sizes

Lists all the database sizes that have been created.[name]: A complete or a partial string.

Example:

eemcli list_database_sizesemcli list_database_sizes -name="Extra*"
Sample Output:
Name:Extra-Small
Description:Extra-small
CPU(cores):4
Memory(GB):4
Storage(GB):Not Specified
Processes(Units):Not Specified

Name:Small
Description:Small database
CPU(cores):8
Memory(GB):8
Storage(GB):Not Specified
Processes(Units):Not Specified

emcli list_database_sizes[name]: A complete or a partial string.


47.6 Database Profile EM CLI Verbs

This section explains the different database provisioning profiles used for Database as a Service. It also explains how these profiles can be created using the EM CLI verbs. The following topics are covered:

47.6.1 About Database Provisioning Profile Types

Given below are the four types of Database provisioning profiles used in Database as a Service and Schema as a Service:

47.6.1.1 DBCA Template

The DBCA template supports both structure plus data and structure only types. This database provisioning profile is created from the production or source database registered with Enterprise Manager.

Note:

Structure and data requires a shutdown of the database. It should be used for very small databases (< 50GB).

47.6.1.2 RMAN

This data content of this database provisioning profile comprises the RMAN backup pieces. Any of the following methods can be used to create the RMAN profile:

  • Hot RMAN backup - This option is enabled only when the archive log mode on the source database is turned ON.

  • Cold RMAN backup - In this case, the source database is brought down to take the RMAN backup.

  • Existing backup - This option can be used when the RMAN backup is already taken on the source and you want to use one of the existing RMAN backups to create a profile.

  • Existing backup pieces when there is no access to the source database - Create profile source database using existing backup pieces when there is no access to the source database. This option can be used when the RMAN backup is already taken on the source and kept in a known location. This option is only supported using EM CLI verbs.

47.6.1.3 Snapclone

The data content of this database provisioning profile is derived from Snapshot information on the filer (NetApp or SunZFS filer) of all the volumes where the datafiles for the source database are residing.

47.6.1.4 Schema

The data content of this database provisioning profile is compiled from an export dump created using the Data pump tool. You can choose to export Schema objects (structure only) or the Schema with data (structure and data).

Note that you cannot export empty schemas or include Oracle schemas (these schemas are not available for selection). Schemas that are filtered out are listed below:

Table 47-6 Filtered Out Schema

ANONYMOUS

DMSYS

OASPUBLIC

OWBSYS

TSMSYS

APEX_030200

EXFSYS

ODM

OWBSYS_AUDIT

WEBSYS

APEX_PUBLIC_USER

FLOWS_

ODM_MTR

SCOTT

WK_PROXY

APPQOSSYS

FLOWS_03000

OLAPSYS

SI_INFORMTN_SCHEMA

WK_TEST

AURORA$JIS$UTILITY$

FLOWS_FILES

ORACLE_OCM

SPATIAL_CSW_ADMIN_USR

WKPROXY

AURORA$ORB$UNAUTHENTICATED

LBACSYS

ORDDATA

SPATIAL_WFS_ADMIN_USR

WKSYS

BI

MDDATA

ORDPLUGINS

SYS

WMSYS

CTXSYS

MDSYS

ORDSYS

SYSMAN

XDB

DBSNMP

MGMT_VIEW

OSE$HTTP$ADMIN

SYSTEM

XS$NULL

DIP

MTSSYS

OUTLN

TRACESRV

 

47.6.2 Creating Provisioning Profiles using EM CLI

This method allows the administrators or cloud provisioning operators to create the database provisioning profile using EM CLI verbs. The following is the syntax of the verb:

emcli create_dbprofile -input_file=data:<Prop file name>

For the verb description and options see Table 47-13.

For the steps to be followed to create a database profile, see Section 47.6.5, "Creating a Database Profile Using EM CLI Verbs".

This command takes in a property file that completely describes the type of profile that will be created and the options used. For property files of different database provisioning profiles, see Section 47.6.3, "Sample EM CLI Property Files".

47.6.3 Sample EM CLI Property Files

The following sections provide sample EMCLI property files for the database provisioning profiles:

47.6.3.1 DBCA Template

Table 47-7 EMCLI Property Files for DBCA Template

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created.

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Create the database gold image

false

Includes the database gold image as part of the profile.

DATABASE_GOLD_IMAGE_TYPE=

Create the GI gold image

false

Includes the GI gold image as part of the profile.

GI_GOLD_IMAGE_TYPE=

Create the database gold image

false

Includes the database gold image as part of the profile.

DATA_CONTENT_MODE=

Create mode for the data content

false

The create mode decides whether to use existing data or create new data.

CREATE_DATA_OPTION=

The content that will be included in the backup

false

The data content that gets included in the backup can be metadata or data.

DATA_CONTENT=

Reference Host Credentials

false

The credentials to be used for OS authentication.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials to be used for performing database related operations.

REF_DB_CREDENTIALS=

Grid Infrastructure Credentials

false

The credentials to be used for OS authentication for grid infrastructure.

REF_GI_CREDENTIALS=

Root Credentials

false

Root credentials to be required to perform privileged operations on host.

REF_HOST_ROOT_CREDENTIALS=

Convert to OFA format

false

Converts to the OFA format.

CONVERT_TO_OFA=

Profile Name

true

Name of the profile.

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in the software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If nothing is specified, the Database version is used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. The default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Create Image version flag

false

Flag to indicate if only the image version needs to be created.

DB_GOLD_IMAGE_CREATE_VERSION_ONLY=

Create Image version flag

false

Flag to indicate if only the image version needs to be created.

GI_GOLD_IMAGE_CREATE_VERSION_ONLY=

GI Home gold image id

false

Entity ID of the gold image.

GI_GOLD_IMAGE_ID=

Database home gold image id

false

Entity ID of the gold image.

DB_GOLD_IMAGE_ID=

Database gold image id

false

Entity ID of the gold image.

DB_GOLD_IMAGE_ID=

Database gold image name

false

Entity name of the database gold image.

DB_GOLD_IMAGE_ENTITY_NAME=

Grid Infrastructure gold image name

false

Entity name of the database gold image.

GI_GOLD_IMAGE_ENTITY_NAME=

Data gold image name

false

Entity name of the data gold image.

DATA_GOLD_IMAGE_ENTITY_NAME=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Storage Type

false

The list of valid storage types are NFS, AGENT, and OmsShared.

STORAGE_TYPE_FOR_SOFTWARE=

Storage Name

false

The storage name as configured in the software library.

STORAGE_NAME_FOR_SOFTWARE=

NFS Mount Point

false

Location at which the NFS server is mounted on the host.

NFS_LOCAL_MOUNT_POINT_FOR_SOFTWARE=

Storage Type

false

The list of valid storage types are NFS, AGENT, and OmsShared

STORAGE_TYPE_FOR_DATA=

Storage Name

false

The storage name as configured in the software library.

STORAGE_NAME_FOR_DATA=

NFS Mount Point

false

Location at which the NFS server is mounted on the host.

NFS_LOCAL_MOUNT_POINT_FOR_DATA=

Is the profile initiated by end user

false

Indicates if the profile initiated by end user ia a part of backup process or the database.

USER_INITIATED=

Is Database target available

false

Indicates if the Database target is available.

DB_TARGET_AVAILABLE=

Platform Name of Source Database

false

Platform Name of Source Database. For example: Linux x86-64, Oracle Solaris on x86-64 (64-bit) etc.

SOURCE_DB_PLATFORM_NAME=

Schedule for Profile Execution

false

Schedule for the profile execution.

PROFILE_SCHEDULE=

Profile Single Refresh

false

Single refresh of the profile.

PROFILE_SINGLE_REFRESH=

Profile Purge Policy Type

false

Profile purge policy type.

PROFILE_PURGE_POLICY_TYPE=

Profile Purge Policy Value

false

Profile purge policy value.

PROFILE_PURGE_POLICY_VALUE=

Profile Image Version

false

Profile image version.

PROFILE_IMAGE_VERSION=

Profile location list

false

Location of the profile list.

PROFILE_LOC_LIST


47.6.3.2 New RMAN Backup from the Source Database

Table 47-8 EMCLI Property Files for a New RMAN Backup

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=RMAN

The content that will be included in the backup

false

The data content that gets included in the backup can be metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false

Is Database target available

false

Is Database target available. Must be set to 'true' for this use case.

DB_TARGET_AVAILABLE=true

Backup Type

false

Backup type.

RMAN.BACKUP_TYPE=

Number of RMAN Channels to use(Default No of Channels : 2

false

Number of Channels to be used. Possible Values: like 1, 2 or 3.

RMAN.RMAN_CHANNELS=

Retain backup until

false

Retain backup until. Format: mm/dd/yyyy.

RMAN.RETAIN_UNTIL=

Encryption Type

false

Encryption Type. Possible Values: ON, OFF.

RMAN.ENCRYPTION_TYPE=

Encryption Password/Key

false

Encryption key which was used to encrypt the backup.

RMAN.ENCRYPTION_PASSWORD=

Compression Type

false

Compression type. Possible Values: HIGH, MEDIUM, LOW.

RMAN.COMPRESSION_TYPE=

RMAN Backup Location

true

Location of the RMAN Backups.

RMAN.RMAN_BACKUP_LOCATION=

Backup file format

false

Backup file format.

RMAN.BACKUP_FILE_FORMAT=

Backup file tag

false

Backup file tag.

RMAN.BACKUP_FILE_TAG=

Source: Control File Location

false

Location of the Control File.

RMAN.CONTROL_FILE_NAME=

Control File Tag

false

Control File Tag.

RMAN.CONTROL_FILE_TAG=

Source: Database SID

false

Database SID of the source database.

RMAN.ORACLE_DB_SID=

Initialize File Name

false

Initialize file name.

RMAN.INIT_FILE_NAME=

User List File Name

false

Name of the users list file. this file should be kept in location specified for RMAN_BACKUP_LOCATION.

RMAN.USERLIST_FILE_NAME=

GDB Name of source Db

false

GDB Name of source Db.

RMAN.DATABASE_NAME=

use existing RMAN Backup

true

use existing RMAN Backup. This should be set to 'NO' for this use case.

RMAN.USE_EXISTING_BACKUP=NO


47.6.3.3 Existing RMAN Backup from the Source Database

Table 47-9 EMCLI Property Files for a Existing RMAN Backup

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=RMAN

The content that will be included in the backup

false

The data content that gets included in the backup can be metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false

Is Database target available

false

Is Database target available. Must be set to 'true' for this use case.

DB_TARGET_AVAILABLE=true

Platform Name of Source Database

false

Platform Name of Source Database. For example, Linux x86-64 or Oracle Solaris on x86-64 (64-bit).

SOURCE_DB_PLATFORM_NAME=

Backup Type

false

Backup type.

RMAN.BACKUP_TYPE=

Number of RMAN Channels to use(Default No of Channels : 2

false

Number of Channels to be used. Possible Values: like 1, 2 or 3.

RMAN.RMAN_CHANNELS=

Retain backup until

false

Retain backup until. Format: mm/dd/yyyy.

RMAN.RETAIN_UNTIL=

Encryption Type

false

Encryption Type. Possible Values: ON, OFF.

RMAN.ENCRYPTION_TYPE=

Source:Encryption Password/Key

false

Encryption key which was used to encrypt the backup.

RMAN.ENCRYPTION_PASSWORD=

Compression Type

false

Compression type. Possible Values: HIGH, MEDIUM, LOW.

RMAN.COMPRESSION_TYPE=

RMAN Backup Location

true

Location of the RMAN Backups.

RMAN.RMAN_BACKUP_LOCATION=

Backup file format

false

Backup file format.

RMAN.BACKUP_FILE_FORMAT=

Backup file tag

false

Backup file tag.

RMAN.BACKUP_FILE_TAG=

Source: Control File Location

false

Location of the Control File.

RMAN.CONTROL_FILE_NAME=

Control File Tag

false

Control File Tag.

RMAN.CONTROL_FILE_TAG=

Source: Database SID

false

Database SID of the source database.

RMAN.ORACLE_DB_SID=

Initialize File Name

false

Initialize file name.

RMAN.INIT_FILE_NAME=

User List File Name

false

Name of the users list file. this file should be kept in location specified for RMAN_BACKUP_LOCATION.

RMAN.USERLIST_FILE_NAME=

GDB Name of source Db

false

GDB Name of source Db.

RMAN.DATABASE_NAME=

use existing RMAN Backup

true

use existing RMAN Backup. This should be set to 'YES' for this use case.

RMAN.USE_EXISTING_BACKUP=YES


47.6.3.4 Existing RMAN Backup on the Stage Location

Table 47-10 EMCLI Property Files for a Existing RMAN Backup on the Stage Location

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=RMAN

The content that will be included in the backup

false

The data content that gets included in the backup can be metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Is the profile initiated by end user

true

Is the profile initiated by end user as part of backup process or the database.

USER_INITIATED=false

Is Database target available

false

Is Database target available. Must be set to 'false' for this use case.

DB_TARGET_AVAILABLE=false

Platform Name of Source Database

false

Platform Name of Source Database. For example, Linux x86-64 or Oracle Solaris on x86-64 (64-bit).

SOURCE_DB_PLATFORM_NAME=

Backup Type

false

Backup type.

RMAN.BACKUP_TYPE=

Number of RMAN Channels to use(Default No of Channels : 2

false

Number of Channels to be used. Possible Values: like 1, 2 or 3.

RMAN.RMAN_CHANNELS=

Retain backup until

false

Retain backup until. Format: mm/dd/yyyy.

RMAN.RETAIN_UNTIL=

Encryption Type

false

Encryption Type. Possible Values: ON, OFF.

RMAN.ENCRYPTION_TYPE=

Source:Encryption Password/Key

false

Encryption key which was used to encrypt the backup.

RMAN.ENCRYPTION_PASSWORD=

Compression Type

false

Compression type. Possible Values: HIGH, MEDIUM, LOW.

RMAN.COMPRESSION_TYPE=

RMAN Backup Location

true

Location of the RMAN Backups.

RMAN.RMAN_BACKUP_LOCATION=

Backup file format

false

Backup file format. Possible Values: %U

RMAN.BACKUP_FILE_FORMAT=

Source: Control File Location

false

Location of the Control File.

RMAN.CONTROL_FILE_NAME=

Control File Tag

false

Control File Tag. Default: control01.ctl

RMAN.CONTROL_FILE_TAG=

Source: Database SID

false

Database SID of the source database.

RMAN.ORACLE_DB_SID=

Initialize File Name

false

Initialize file name.

RMAN.INIT_FILE_NAME=

User List File Name

false

Name of the users list file. this file should be kept in location specified for RMAN_BACKUP_LOCATION.

RMAN.USERLIST_FILE_NAME=

GDB Name of source Db

false

GDB Name of source Db.

RMAN.DATABASE_NAME=

RMDB Version

false

RMDBS version

RMAN.DATABASE_VERSION=


47.6.3.5 Snapclone Database

Table 47-11 EMCLI Property Files for Snapclone Database

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created.

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database).

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets.

REF_NODE_SELECTED=

Create the database gold image

false

Includes the database gold image as part of the profile.

DATABASE_GOLD_IMAGE_TYPE=

Create the GI gold image

false

Includes the GI gold image as part of the profile.

GI_GOLD_IMAGE_TYPE=

Create the database gold image

false

Includes the database gold image as part of the profile.

DATA_CONTENT_MODE=

Create mode for the data content

false

The create mode decides whether to use existing data or create new data.

CREATE_DATA_OPTION=

The content that will be included in the backup

false

The data content that gets included in the backup can be metadata or data.

DATA_CONTENT=

Reference Host Credentials

false

The credentials to be used for OS authentication.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials to be used for performing database related operations.

REF_DB_CREDENTIALS=

Grid infrastructure credentials

false

The credentials to be used for OS authentication for grid infrastructure.

REF_GI_CREDENTIALS=

Root Credentials

false

Root credentials that will be required to perform privileged operations on host.

REF_HOST_ROOT_CREDENTIALS=

Convert to OFA format

false

Converts to the OFA format.

CONVERT_TO_OFA=

Profile Name

true

Name of the profile.

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in the software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If nothing is specified, the Database version is used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. The default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Create Image version flag

false

Flag to indicate if only image version needs to be created.

DB_GOLD_IMAGE_CREATE_VERSION_ONLY=

Create Image version flag

false

Flag to indicate if only image version needs to be created.

GI_GOLD_IMAGE_CREATE_VERSION_ONLY=

GI Home gold image id

false

Entity ID of the gold image.

GI_GOLD_IMAGE_ID=

Database home gold image id

false

Entity ID of the gold image.

DB_GOLD_IMAGE_ID=

Database gold image id

false

Entity ID of the gold image.

DB_GOLD_IMAGE_ID=

Database gold image name

false

Entity name of the database gold image.

DB_GOLD_IMAGE_ENTITY_NAME=

Grid Infrastructure gold image name

false

Entity name of the database gold image.

GI_GOLD_IMAGE_ENTITY_NAME=

Data gold image name

false

Entity name of the data gold image.

DATA_GOLD_IMAGE_ENTITY_NAME=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Storage Type

false

The list of valid storage types are NFS, AGENT, and OmsShared.

STORAGE_TYPE_FOR_SOFTWARE=

Storage Name

false

The storage name as configured in the software library.

STORAGE_NAME_FOR_SOFTWARE=

NFS Mount Point

false

Location at which the NFS server is mounted on the host.

NFS_LOCAL_MOUNT_POINT_FOR_SOFTWARE=

Storage Type

false

The list of valid storage types are NFS, AGENT, and OmsShared.

STORAGE_TYPE_FOR_DATA=

Storage Name

false

The storage name as configured in the software library.

STORAGE_NAME_FOR_DATA=

NFS Mount Point

false

Location at which the NFS server is mounted on the host.

NFS_LOCAL_MOUNT_POINT_FOR_DATA=

Is the profile initiated by end user

false

Is the profile initiated by the end user a part of backup process or the database.

USER_INITIATED=

Is Database target available

false

Is the Database target available.

DB_TARGET_AVAILABLE=

Platform Name of Source Database

false

Platform Name of Source Database. For example: Linux x86-64, Oracle Solaris on x86-64 (64-bit) etc.

SOURCE_DB_PLATFORM_NAME=

Schedule for Profile Execution

false

Schedule for profile execution.

PROFILE_SCHEDULE=

Profile Single Refresh

false

Single refresh of the profile.

PROFILE_SINGLE_REFRESH=

Profile Purge Policy Type

false

Profile purge policy type.

PROFILE_PURGE_POLICY_TYPE=

Profile Purge Policy Value

false

Profile purge policy value.

PROFILE_PURGE_POLICY_VALUE=

Profile Image Version

false

Profile image version.

PROFILE_IMAGE_VERSION=

Profile location list

false

Location of the profile list.

PROFILE_LOC_LIST=


47.6.3.6 Schema Database

Table 47-12 EMCLI Property Files for Schema Database

Name Required Description Variable

Reference Database

true

The source database from which the profile will be created

REFERENCE_DATABASE=

Type of the reference database

true

The target type of the source database (oracle_database or rac_database)

REFERENCE_DATABASE_TYPE=

Reference Node

false

The reference node from which the profile will be created. Applicable only for RAC and Cluster targets

REF_NODE_SELECTED=

Backup mechanism for data

false

Variable to identify what mode needs to be used for creating backup data. Possible values are EXPORT, DBCA_TEMPLATE, RMAN, and THIN_PROVISIONING

DATA_CONTENT_MODE=EXPORT

The content that will be included in the backup

false

The data content that gets included in the backup can be metadata or data. Possible values are METADATA_ONLY and METADATA_AND_DATA.

DATA_CONTENT=METADATA_AND_DATA

Reference Host Credentials

true

The credentials that will be used for OS authentication. Format is <Cred Name:Owner>. If this is not provided,preferred credentials will be checked against NormalHostCreds.

REF_HOST_CREDENTIALS=

Database Credentials

false

The credentials that will be used for performing database authentication. Format is <Cred Name:Owner>. If this is not provided, preferred credentials will be checked against SysDbaCreds

REF_DB_CREDENTIALS=

Profile Name

true

Name of the profile

PROFILE_NAME=

Profile Description

false

Name with which the profile should be created.

PROFILE_DESC=

Profile location

true

Location of the profile in software library.

PROFILE_LOCATION=

Profile Version

false

Version of the profile. If none is specified, the Database version shall be used.

PROFILE_VERSION=

Profile Vendor

false

Vendor of the profile. Default is Oracle.

PROFILE_VENDOR=

Profile notes

false

Notes for the profile.

PROFILE_NOTES=

Data gold image name

true

Entity name of the data gold image

DATA_GOLD_IMAGE_ENTITY_NAME=

Working Directory

false

Working directory is the location where the files are staged.

WORKING_DIRECTORY=

Schemas to be exported

true

List of schemas that needs to be included as part of the export.

EXPORT.SCHEMA_INCLUDE_LIST.0=

Dump Directories

false

List of directory objects that needs to be used for storing export. Format: directory=dir1,file_name=file1%U.dmp[,max_size=1MB].

EXPORT.DUMP_DIRECTORY_LIST.0=

Log Directory

false

Log directory location where the log file generated during export.

PORT.LOG_FILE_DIRECTORY=

Degree of Parallelism

false

Degree of Parallelism indicates the number of threads. For example, 1 or 2 or 3...

EXPORT.DEGREE_OF_PARALLELISM=


47.6.4 Database Profile EM CLI Verbs

The table below provides the verbs related to database profile.

Table 47-13 Database Profile EM CLI Verbs

Verb Description Format

emcli create_dbprofile

Creates a new database profile.

Options:

  • -input_file - A property file which completely describes the type of profile that will be created and the options used. Enter emcli help describe_dbprofile_input for help with populating values for the property file. For property file details see Section 47.6.3, "Sample EM CLI Property Files".

  • -schedule

    • frequency: Frequency type with which the Database Profile will be created. It can be interval(in minutes), weekly, monthly or yearly.

    • start_time: Denotes the starting time of database profile component creation in the format yy-MM-dd HH:mm.

    • end_time: Denotes the end time of database profile component creation repetition in the format yy-Mm-dd HH:mm.

    • repeat: Repetition rate at which database profile will be created. If the frequency is interval, then repeat will be in minutes.

    • months: Number of months after which repetition of database profile component creation should occur.

    • days: Number of days after which repetition of database profile component creation should occur.

    • tz: Time zone ID. For example tz:America/New_York.

    • grace_period: A period of time in minutes that defines the maximum permissible delay when attempting to create a database profile. If the job system cannot start the execution within a time period equal to the scheduled time + grace period, it will set the create database profile to be skipped.By default, grace period is indefinite.

  • -purge_policy - Purges the collected data based on number of days or count of snapshots. If it is not specified, the default is NONE. Allowed values are DAYS, and SNAPSHOT.

    • DAYS specifies the number of days after which the data component should be purged.

    • SNAPSHOT specifies the count or number of data components, after which the older data will be purged.

Example

emcli create_dbprofile -input_file="data:/tmp/profile.txt" -schedule="frequency:interval;start_time:14-10-05 05:30;end_time:14-10-12 05:23;repeat:30;grace_period:60;tz:America/New_York" -purge_policy=DAYS:2

emcli create_dbprofile

-input_file=data:"absolute file path"

[-schedule=

[frequency:interval|weekly|monthly|yearly];

start_time:yy-MM-dd HH:mm;

end_time:yy-MM-dd HH:mm;

[repeat:#m];

[months:#,#,#,...];

[days:#,#,#,...];

[tz:{timezone ID}];

[grace_period:xxx];

]

[-purge_policy=DAYS|SNAPSHOTS: number]

emcli edit_dbprofile

Updates the cloned database profile.

Options:

  • [-comp_loc] - Indicates the database profile component location in the software library.

  • [-schedule] - Indicates the schedule for cloning.

    • [frequency:interval| daily |weekly|monthly|yearly];

    • start_time:yy-MM-dd HH:mm;

    • end_time:yy-MM-dd HH:mm;

    • [repeat:#m];

    • [months:#,#,#,...];

    • [days:#,#,#,...];

    • [tz:{java timezone ID}];

    • [grace_period:xxx];

  • [-purge_policy] - Indicates the duration after which the purge occurs.

Example:

emcli edit_dbprofile
-comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/Database xyxy.us.example.com Profile100"
-schedule="start_time:14-07-22 03:00;frequency:interval;end_time:14-07-22 23:00;repeat:30"
-purge_policy="DAYS:1"

emcli edit_dbprofile

-comp_loc="Database Profile component location in software library"

[-schedule=

[frequency:interval|daily |weekly|monthly|yearly];

start_time:yy-MM-dd HH:mm;

end_time:yy-MM-dd HH:mm;

[repeat:#m];

[months:#,#,#,...];

[days:#,#,#,...];

[tz:{java timezone ID}];

[grace_period:xxx];

[-purge_policy=days| snapshots: number]

emcli delete_dbprofile

Deletes the database profile.

Options:

  • comp_loc - Indicates the database profile component location in the software library.

  • [-version] - Indicates the database profile component version name.

Examples:

  • emcli delete_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/Database xyxy.example.com Profile101"

  • emcli delete_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/ Database xyxy.example.com Profile101" -version="THIN_PROVISIONING_07_25_2014_03_00_AM"

emcli delete_dbprofile

-comp_loc="Database Profile component location in software library"

[-version="Database Profile component version name"]

emcli list_dbprofiles

Lists the database profiles.

Option:

  • [-details] - Provides details of the database profiles.

Example:

emcli list_dbprofiles -details

emcli list_dbprofiles [-details]

emcli refresh_dbprofile

Refreshes the database profile.

Options:

  • -comp_loc - Indicates the database profile component location in the software library.

Example:

emcli refresh_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/ Database xyxy.example.com Profile102"

emcli refresh_dbprofile

-comp_loc="Database Profile component location in software library"

emcli refresh_database

Refreshes the database.

Options:

  • -target_name - Indicates the target database name.

  • -target_type - Indicates the target database type.

  • -input_file - Indicates the input file that defines the input field values.

Example:

emcli refresh_database -target_name="database" -target_type="oracle_database" -input_file=data:"/tmp/refr.txt"

emcli refresh_database

-target_name="database target name"

-target_type="database target type"

-input_file=data:"file:path"

emcli delete_database

Deletes the database.

Options:

Example:

emcli delete_database -inputFile=/u01/files/delete_clone.props

emli delete_database

-inputFile="File containing properties required for deleting a clone"


47.6.5 Creating a Database Profile Using EM CLI Verbs

This section describes the procedure to create a database profile, RMAN backup, RMAN image backup or a Snapshot backup using EM CLI verbs.

Note:

The procedure to create a RMAN backup, RMAN image backup or Snapshot database is the same as the procedure to be followed to create a database profile. However, the only difference is in the property file used for the different flavours.

Figure 47-1 Creating a Database Profile Using EM CLI Verbs

Surrounding text describes Figure 47-1 .

Follow the steps below to create a database profile:

  1. Create a template properties file from a procedure definition.

    To create a template properties file follow the steps below:

    1. Retrieve the GUID or the name of the procedure. Run the following command to retrieve these.

      emcli get_procedures
      [-type={procedure type}]
      
      Sample command:
      emcli get_procedures -type=DBPROV
      
      Sample output:
      GUID                  Type    Name                DisplayName                           Version  Owner   Parent Procedure
      0A15E9DC285B2EF5E053E87BF00A6701  DBPROV  CLOUD_DEPLOY_SOFTWARE_NAME  Software Life Cycle Management Procedure  14.52    ORACLE
      0A15E9DC20712EF5E053E87BF00A6701  DBPROV  CLEANUP_DB_PROC             Cleanup Mass Database                     13.0     ORACLE
      0A15E9DC205C2EF5E053E87BF00A6701  DBPROV  DBREPLAYCLIENTDP_NG         Provision Oracle Database Client          14.0     ORACLE
      0A15E9DC204E2EF5E053E87BF00A6701  DBPROV  SIHA_SIDB_PROC              Provision Oracle Database                 14.0     ORACLE
      
    2. Input the GUID or the name as an input value in the following command to generate a template properties file.

      emcli describe_procedure_input
      [-procedure={procedure GUID}]
      [-name={procedure name or procedure configuration}]
      [-owner={owner of the procedure or procedure configuration}][-parent_proc={procedure of the procedure configuration. This only applies to describe a procedure configuration with the same name}]
      
      Sample command:
      emcli describe_procedure_input -procedure=0A15E9DC204E2EF5E053E87BF00A6701> /tmp/snapprofile.txt
      
  2. Enter new values in the properties file.

    Use an editor to edit the properties file. Enter the desired values for the variables and save the properties file.

    For different flavours of database profile see the following:

    Table 47-14 Sample Properties File for Creating a New Database Profile

    Parameters Sample values Description

    Mandatory Parameters

    REFERENCE_DATABASE

    REFERENCE_DATABASE=dbname.xyz.com

    The source database from which the profile is to be created.

    REFERENCE_DATABASE_TYPE

    REFERENCE_DATABASE_TYPE=oracle_database

    The target type of the source database. Accepted values are oracle_database or rac_database.

    DATA_CONTENT_MODE

    DATA_CONTENT_MODE=STORAGE_SNAPSHOT

    Data Mode for which the database profile needs to be submitted. The accepted values are: EXPORT, DBCA_TEMPLATE, RMAN, DNFS, and STORAGE_SNAPSHOT.

    PROFILE_NAME

    PROFILE_NAME=Profile_snap

    Name of the profile.

    PROFILE_LOCATION

    PROFILE_LOCATION=Database Provisioning Profiles/11.2.0.4.0/linux_x64/

    Location of the profile in the software library.

    Optional Parameters

    REF_NODE_SELECTED

    REF_NODE_SELECTED= xxyy.us.example.com

    The reference node from which the profile is to be created. This parameter is applicable only for RAC and cluster targets.

    DATABASE_GOLD_IMAGE_TYPE

     

    Includes the database gold image as part of the profile.

    GI_GOLD_IMAGE_TYPE

     

    Includes the GI gold image as part of the profile.

    CREATE_DATA_OPTION

     

    Indicates if existing data is to be used or to create new data.

    DATA_CONTENT

    DATA_CONTENT=METADATA_AND_DATA

    The data content that gets included in the backup can be METADATA_AND_DATA or DATA.

    REF_HOST_CREDENTIALS

    REF_HOST_CREDENTIALS=AE_2COOL:ARA1

    The credentials for OS authentication.

    REF_DB_CREDENTIALS

    REF_DB_CREDENTIALS=SYS_WD:RAH

    The credentials for performing database related operation.

    REF_GI_CREDENTIALS

     

    The credentials for OS authentication of grid infrastructure.

    REF_HOST_ROOT_CREDENTIALS

    REF_HOST_ROOT_CREDENTIALS= AE_2OOL:RA1

    Root credentials required to perform privileged operations on host.

    CONVERT_TO_OFA

     

    Converts to OFA format.

    PROFILE_DESC

    PROFILE_DESC=11204 SnapClone profile 1

    Description of the profile.

    PROFILE_VERSION

     

    Version of the profile. If this parameter is not specified, the database version is used.

    PROFILE_VENDOR

     

    Vendor of the profile. The default is Oracle.

    PROFILE_NOTES

     

    Notes for the profile.

    DB_GOLD_IMAGE_CREATE_VERSION_ONLY

     

    Flag to indicate if only image version needs to be created.

    GI_GOLD_IMAGE_CREATE_VERSION_ONLY

     

    Flag to indicate if only image version needs to be created.

    GI_GOLD_IMAGE_ID

     

    Entity ID of the GI gold image.

    DB_GOLD_IMAGE_ID

     

    Entity ID of the DB gold image.

    DB_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the database gold image.

    GI_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the GI gold image.

    DATA_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the data gold image.

    WORKING_DIRECTORY

    WORKING_DIRECTORY=/tmp

    Working directory is the location where the files are staged.

    STORAGE_TYPE_FOR_SOFTWARE

     

    The list of valid storage types are NFS, AGENT, and OmsShare.

    STORAGE_NAME_FOR_SOFTWARE

     

    The storage name as configured in the software library.

    NFS_LOCAL_MOUNT_POINT_FOR_SOFTWARE

     

    Location at which the NFS server is mounted on the host.

    STORAGE_TYPE_FOR_DATA

     

    The list of valid storage types are NFS, AGENT, and OmsShared.

    STORAGE_NAME_FOR_DATA

     

    The storage name as configured in the software library.

    NFS_LOCAL_MOUNT_POINT_FOR_DATA

     

    Location at which the NFS server is mounted on the host.

    USER_INITIATED

     

    Indicates if the profile initiated by end user ia a part of backup process or the database.

    DB_TARGET_AVAILABLE

     

    Indicates if the database target is available.

    SOURCE_DB_PLATFORM_NAME

     

    Platform name of source database. For example: Linux x86-64, Oracle Solaris on x86-64 (64-bit), etc.

    PROFILE_SCHEDULE

     

    Schedule for profile execution.

    PROFILE_SINGLE_REFRESH

     

    Single refresh of the profile.

    PROFILE_PURGE_POLICY_TYPE

     

    Type of profile purge policy. Accepted values are SNAPSHOTS or DAYS. The default value is NONE.

    PROFILE_PURGE_POLICY_VALUE

     

    Value of profile purge policy.

    PROFILE_IMAGE_VERSION

     

    Version of the profile image.


    Table 47-15 Sample Properties File for Creating a Full Backup Profile

    Parameters Sample values Description

    Mandatory Parameters

    REFERENCE_DATABASE

    REFERENCE_DATABASE=dbname.xyz.com

    The source database from which the profile will be created.

    REFERENCE_DATABASE_TYPE

    REFERENCE_DATABASE_TYPE=oracle_database

    The target type of the source database. It can be oracle_database or rac_database.

    DATA_CONTENT_MODE

    DATA_CONTENT_MODE=STORAGE_SNAPSHOT

    Data Mode for which the database profile needs to be submitted. It can have the following values: EXPORT, DBCA_TEMPLATE, RMAN, DNFS, and STORAGE_SNAPSHOT

    PROFILE_NAME

    PROFILE_NAME=Profile_snap

    Name of the profile.

    PROFILE_LOCATION

    PROFILE_LOCATION=Database Provisioning Profiles/11.2.0.4.0/linux_x64/

    Location of the profile in software library.

    BACKUP_FILE_TAG

    BACKUP_FILE_TAG=data_backup_1419417051961

    Tag of backup files.

    BACKUP_TYPE

    BACKUP_TYPE=OFFLINE

    Type of backup. Accepted values are OFFLINE or ONLINE. The default is OFFLINE.

    BACKUP_FILE_FORMAT

    BACKUP_FILE_FORMAT=backup_%U

    Format of backup file.

    RMAN_CHANNELS

    RMAN_CHANNELS=2

    Number of RMAN channels.

    RMAN_BACKUP_LOCATION

    RMAN_BACKUP_LOCATION=/oradbnas/aime_slc05ntg/sec

    Location where RMAN backup files will be created. This parameter is mandatory if IS_SAVE_TARGET_PROFILE is set to Y and DATA_CONTENT_MODE is RMAN or DNFS.

    Optional Parameters

    REF_NODE_SELECTED

    REF_NODE_SELECTED= slch.xyz.com

    The reference node from which the profile will be created. This parameter is applicable only for RAC and cluster targets.

    DATABASE_GOLD_IMAGE_TYPE

     

    Includes the database gold image as part of the profile.

    GI_GOLD_IMAGE_TYPE

     

    Includes the GI gold image as part of the profile.

    CREATE_DATA_OPTION

     

    Indicates if existing data is to be used or to create new data.

    DATA_CONTENT

    DATA_CONTENT=METADATA_AND_DATA

    The data content that gets included in the backup can be METADATA_AND_DATA or DATA.

    REF_HOST_CREDENTIALS

    REF_HOST_CREDENTIALS=AE_2COL:RA1

    The credentials for OS authentication.

    REF_DB_CREDENTIALS

    REF_DB_CREDENTIALS=SYS_WL1:RA1

    The credentials for performing database related operation.

    REF_GI_CREDENTIALS

     

    The credentials for OS authentication of grid infrastructure.

    REF_HOST_ROOT_CREDENTIALS

    REF_HOST_ROOT_CREDENTIALS= AE_2L:RA1

    Root credentials required to perform privileged operations on host.

    CONVERT_TO_OFA

     

    Converts to OFA format.

    PROFILE_DESC

    PROFILE_DESC=11204 SnapClone profile 1

    Description of the profile.

    PROFILE_VERSION

     

    Version of the profile. If this parameter is not specified, the database version is used.

    PROFILE_VENDOR

     

    Vendor of the profile. The default is Oracle.

    PROFILE_NOTES

     

    Notes for the profile.

    DB_GOLD_IMAGE_CREATE_VERSION_ONLY

     

    Flag to indicate if only image version needs to be created.

    GI_GOLD_IMAGE_CREATE_VERSION_ONLY

     

    Flag to indicate if only image version needs to be created.

    GI_GOLD_IMAGE_ID

     

    Entity ID of the GI gold image.

    DB_GOLD_IMAGE_ID

     

    Entity ID of the DB gold image.

    DB_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the database gold image.

    GI_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the GI gold image.

    DATA_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the data gold image.

    WORKING_DIRECTORY

    WORKING_DIRECTORY=/tmp

    Working directory is the location where the files are staged.

    STORAGE_TYPE_FOR_SOFTWARE

     

    The list of valid storage types are NFS, AGENT, and OmsShared.

    STORAGE_NAME_FOR_SOFTWARE

     

    The storage name as configured in the software library.

    NFS_LOCAL_MOUNT_POINT_FOR_SOFTWARE

     

    Location at which the NFS server is mounted on the host.

    STORAGE_TYPE_FOR_DATA

     

    The list of valid storage types are NFS, AGENT, and OmsShared.

    STORAGE_NAME_FOR_DATA

     

    The storage name as configured in the software library.

    NFS_LOCAL_MOUNT_POINT_FOR_DATA

     

    Location at which the NFS server is mounted on the host.

    USER_INITIATED

     

    Indicates if the profile initiated by end user is a part of backup process or the database.

    DB_TARGET_AVAILABLE

     

    Indicates if the database target is available.

    SOURCE_DB_PLATFORM_NAME

     

    Platform name of source database. For example: Linux x86-64, Oracle Solaris on x86-64 (64-bit), etc.

    PROFILE_SCHEDULE

     

    Schedule for profile execution.

    PROFILE_SINGLE_REFRESH

     

    Single refresh of the profile.

    PROFILE_PURGE_POLICY_TYPE

     

    Type of profile purge policy. Accepted values are SNAPSHOTS or DAYS. The default value is NONE.

    PROFILE_PURGE_POLICY_VALUE

     

    Value of profile purge policy.

    PROFILE_IMAGE_VERSION

     

    Version of the profile image.


    Table 47-16 Sample Properties File for Creating a Thin Backup Profile

    Parameters Sample values Description

    Mandatory Parameters

    REFERENCE_DATABASE

    REFERENCE_DATABASE=dbname.example.com

    The source database from which the profile will be created.

    REFERENCE_DATABASE_TYPE

    REFERENCE_DATABASE_TYPE=oracle_database

    The target type of the source database. It can be oracle_database or rac_database.

    DATA_CONTENT_MODE

    DATA_CONTENT_MODE=STORAGE_SNAPSHOT

    Data Mode for which the database profile needs to be submitted. It can have the following values: EXPORT, DBCA_TEMPLATE, RMAN, DNFS, and STORAGE_SNAPSHOT

    PROFILE_NAME

    PROFILE_NAME=Profile_snap

    Name of the profile.

    PROFILE_LOCATION

    PROFILE_LOCATION=Database Provisioning Profiles/11.2.0.4.0/linux_x64/

    Location of the profile in software library.

    DNFS.BACKUP_FILE_TAG

    DNFS.BACKUP_FILE_TAG=data_backup_1419417051961

    Tag of backup files.

    DNFS.BACKUP_TYPE

    DNFS.BACKUP_TYPE=OFFLINE

    Type of backup. Accepted values are OFFLINE or ONLINE. The default is OFFLINE.

    DNFS.BACKUP_FILE_FORMAT

    DNFS.BACKUP_FILE_FORMAT=backup_%U

    Format of backup file.

    DNFS.BACKUP_LOCATION

    DNFS.BACKUP_LOCATION=/oradbnas/aime_slc05ntg/suk

    Location where RMAN backup files will be created. It is mandatory if IS_SAVE_TARGET_PROFILE is set to Y and DATA_CONTENT_MODE is RMAN or DNFS.

    DNFS.BACKUP_IMAGE_MODE

    DNFS.BACKUP_IMAGE_MODE=OfflineImage

    Backup Image Mode

    DNFS.BACKUP_IMAGE_TYPE

    DNFS.BACKUP_IMAGE_TYPE=RMANImage

    Type of backup Image.

    Optional Parameters

    REF_NODE_SELECTED

    REF_NODE_SELECTED= slnh.us.example.com

    The reference node from which the profile will be created. This parameter is applicable only for RAC and cluster targets.

    DATABASE_GOLD_IMAGE_TYPE

     

    Includes the database gold image as part of the profile.

    GI_GOLD_IMAGE_TYPE

     

    Includes the GI gold image as part of the profile.

    CREATE_DATA_OPTION

     

    Indicates if existing data is to be used or to create new data.

    DATA_CONTENT

    DATA_CONTENT=METADATA_AND_DATA

    The data content that gets included in the backup can be METADATA_AND_DATA or DATA.

    REF_HOST_CREDENTIALS

    REF_HOST_CREDENTIALS=AE_2CL:RA1

    The credentials for OS authentication.

    REF_DB_CREDENTIALS

    REF_DB_CREDENTIALS=SYS_W1:RA1

    The credentials for performing database related operation.

    REF_GI_CREDENTIALS

     

    The credentials for OS authentication of grid infrastructure.

    REF_HOST_ROOT_CREDENTIALS

    REF_HOST_ROOT_CREDENTIALS= AE_2CL:RA1

    Root credentials required to perform privileged operations on host.

    CONVERT_TO_OFA

     

    Converts to OFA format.

    PROFILE_DESC

    PROFILE_DESC=11204 SnapClone profile 1

    Description of the profile.

    PROFILE_VERSION

     

    Version of the profile. If this parameter is not specified, the database version is used.

    PROFILE_VENDOR

     

    Vendor of the profile. The default is Oracle.

    PROFILE_NOTES

     

    Notes for the profile.

    DB_GOLD_IMAGE_CREATE_VERSION_ONLY

     

    Flag to indicate if only image version needs to be created.

    GI_GOLD_IMAGE_CREATE_VERSION_ONLY

     

    Flag to indicate if only image version needs to be created.

    GI_GOLD_IMAGE_ID

     

    Entity ID of the GI gold image.

    DB_GOLD_IMAGE_ID

     

    Entity ID of the DB gold image.

    DB_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the database gold image.

    GI_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the GI gold image.

    DATA_GOLD_IMAGE_ENTITY_NAME

     

    Entity name of the data gold image.

    WORKING_DIRECTORY

    WORKING_DIRECTORY=/tmp

    Working directory is the location where the files are staged.

    STORAGE_TYPE_FOR_SOFTWARE

     

    The list of valid storage types are NFS, AGENT, and OmsShared.

    STORAGE_NAME_FOR_SOFTWARE

     

    The storage name as configured in the software library.

    NFS_LOCAL_MOUNT_POINT_FOR_SOFTWARE

     

    Location at which the NFS server is mounted on the host.

    STORAGE_TYPE_FOR_DATA

     

    The list of valid storage types are NFS, AGENT, and OmsShared.

    STORAGE_NAME_FOR_DATA

     

    The storage name as configured in the software library.

    NFS_LOCAL_MOUNT_POINT_FOR_DATA

     

    Location at which the NFS server is mounted on the host.

    USER_INITIATED

     

    Indicates if the profile initiated by end user ia a part of backup process or the database.

    DB_TARGET_AVAILABLE

     

    Indicates if the database target is available.

    SOURCE_DB_PLATFORM_NAME

     

    Platform name of source database. For example: Linux x86-64, Oracle Solaris on x86-64 (64-bit), etc.

    PROFILE_SCHEDULE

     

    Schedule for profile execution.

    PROFILE_SINGLE_REFRESH

     

    Single refresh of the profile.

    PROFILE_PURGE_POLICY_TYPE

     

    Type of profile purge policy. Accepted values are SNAPSHOTS or DAYS. The default value is NONE.

    PROFILE_PURGE_POLICY_VALUE

     

    Value of profile purge policy.

    PROFILE_IMAGE_VERSION

     

    Version of the profile image.

    USE_EXISTING_BACKUP

     

    Whether exiting backup is to be used.


  3. Execute the following EM CLI verb to create a database profile, using the updated properties file as the input file.

    emcli create_dbprofile
                         -input_file=data:"file:path"
                  [-schedule=
                                 [frequency:interval|daily|weekly|monthly|yearly];
                                 start_time:yy-MM-dd HH:mm;
                                 end_time:yy-MM-dd HH:mm;
                                 [repeat:#m];
                                 [months:#,#,#,...];
                                 [days:#,#,#,...];
                                 [tz:{java timezone ID}];
                                 [grace_period:xxx];
          ]
          [-purge_policy=days|snapshots: number]
    
    Samples:
    emcli create_dbprofile -input_file=data:"/tmp/snapprofile.txt" -schedule="start_time:14-06-23 01:00;frequency:yearly;end_time:14-05-28 01:00;days:1,3,8,7,10;months:1,3,9,11,1" -purge_policy="SNAPSHOTS:1"
     
    emcli create_dbprofile -input_file=data:"/tmp/snapprofile.txt" -schedule="start_time:14-05-28 01:00;frequency:monthly;end_time:14-05-28 01:00;days:1,3,8,7" -purge_policy="DAYS:1"
     
    emcli create_dbprofile -input_file=data:"/tmp/snapprofile.txt" -schedule="start_time:14-05-28 01:00;frequency:weekly;end_time:14-05-28 01:00;days:1,3,7" -purge_policy="SNAPSHOTS:1"
     
    emcli create_dbprofile -input_file=data:"/tmp/snapprofile.txt" -schedule="start_time:14-05-28 01:00;frequency:daily;end_time:14-05-28 01:00" -purge_policy="DAYS:1" -purge_policy="SNAPSHOTS:1"
     
    emcli create_dbprofile -input_file=data:"/tmp/snapprofile.txt" -schedule="start_time:14-07-22 03:00;frequency:interval;end_time:14-07-22 07:00;repeat:30" -purge_policy="SNAPSHOTS:1"
    
    Sample output:
    Create Database Profile deployment procedure has been submitted successfully with the instance name :
    'CreateDatabaseProfile_SYSMAN_06_23_2014_01_00_PM' and execution_guid='0AE6096550756B26E0539878B10A6FF5'
    You can track the status of profile creation using the following command:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    
  4. Verify the status of the database profile creation by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5
    
    Sample Output:
    0AE6096550716B26E0539878B10A6FF5, PROFILE, CreateDatabaseProfile_SYSMAN_12_23_2014_23_18_PM, Running
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    

47.6.6 Editing a Database Profile Using EM CLI Verbs

This section describes the procedure to edit a database profile using EM CLI verbs.

Figure 47-2 Editing a Database Profile Using EM CLI Verbs

Surrounding text describes Figure 47-2 .

Follow the steps below to edit a database profile:

  1. Identify the location of the database profile in the software library.

    Execute the following command to locate the database profile.

    emcli list_dbprofiles
    [-details]
    
    Sample command:
    emcli list_dbprofiles
    
    Sample output:
    Name=Profile_snap,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/
    Name=Profile_rman,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/
    
  2. Edit the database profile with the following command, using the obtained location.

    emcli edit_dbprofile
          -comp_loc="Database Profile component location in software library"
          [-schedule=
                    [frequency:interval| daily |weekly|monthly|yearly];
                    start_time:yy-MM-dd HH:mm;
                    end_time:yy-MM-dd HH:mm;
                    [repeat:#m];
                    [months:#,#,#,...];
                    [days:#,#,#,...];
                    [tz:{java timezone ID}];
                    [grace_period:xxx];
            ]
            [-purge_policy=days| snapshots: number]
    
    Sample command:
    emcli edit_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/Profile_snap " -schedule="start_time:14-07-22 03:00;frequency:interval;end_time:14-07-22 23:00;repeat:30" -purge_policy="DAYS:1"
    
    Sample output:
    The Create Database Profile deployment procedure with new schedule and purge policy has been submitted successfully with the instance name :
    'CreateDatabaseProfile_SYSMAN_07_22_2014_03_00_PM' and execution_guid= '0AE6096550756B26E0539878B10A6FF5'
    You can track the status of profile creation using the following command:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    
  3. Verify the status of the database profile edit by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5
    
    Sample output:
    0AE6096550716B26E0539878B10A6FF5, PROFILE, CreateDatabaseProfile_SYSMAN_07_22_2014_03_00_PM, Running
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    

47.6.7 Deleting a Database Profile Using EM CLI Verbs

This section describes the procedure to delete a database profile using EM CLI verbs.

Figure 47-3 Deleting a Database Profile Using EM CLI Verbs

Surrounding text describes Figure 47-3 .

Follow the steps below to delete a database profile:

  1. Identify the location and version of the database profile component in the software library.

    Execute the following command to locate the database profile.

    emcli list_dbprofiles
    [-details]
    
    Sample command:
    emcli list_dbprofiles
    
    Sample output:
    Name=Profile_snap,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/,Type=STORAGE_SNAPSHOT,Status=Ready,Description= Database Reference Profile 05-11-2014 12:40 PM from database.mycompany.com
    Version: STORAGE SNAPSHOT_05_11_2014_12_40_PM: ,contains=STORAGE_SNAPSHOT(s),removalOverdue=0, sourceDatabaseName=database.mycompany.com.
     
    Name=Profile_rman,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/,Type=RMAN,Status=Ready,Description=Database Reference Profile 04-11-2014 12:40 PM from database.mycompany.com
    Version : RMAN_04_11_2014_12_40_PM,contains=RMAN(s),removalOverdue=0, sourceDatabaseName=database.mycompany.com.
    
  2. Delete the database profile with the following command, using the obtained location and version.

    emcli delete_dbprofile
        -comp_loc="Database Profile component location in software library"
        [-version="Database Profile component version name"]
    
    Sample command:
    emcli delete_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/Profile_snap"
    
    emcli delete_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/ Profile_snap" -version="STORAGE SNAPSHOT__05_11_2014_12_40_PM"
    
    Sample output:
    Delete Database Profile deployment procedure has been submitted successfully with the instance name :'DeleteDatabaseProfile_SYSMAN_07_22_2014_03_00_PM' and execution_guid='0AE6096550756B26E0539878B10A6FF5'
    You can track the status of profile creation using the following command:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    
  3. Verify the status of the database profile deletion by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5
    
    Sample output:
    0AE6096550716B26E0539878B10A6FF5, PROFILE, DeleteDatabaseProfile_SYSMAN_07_22_2014_03_00_PM, COMPLETED
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    

47.6.8 Viewing All the Database Profiles

Execute the following command to view all the database profiles with their details.

emcli list_dbprofiles
[-details]

Sample command:
emcli list_dbprofiles

Sample output:
Name=Profile_snap,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/,Type=STORAGE_SNAPSHOT,Status=Ready,Description= Database Reference Profile 05-11-2014 12:40 PM from database.mycompany.com
Version: STORAGE SNAPSHOT_05_11_2014_12_40_PM: ,contains=STORAGE_SNAPSHOT(s),removalOverdue=0, sourceDatabaseName=database.mycompany.com.
 
Name=Profile_rman,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/,Type=RMAN,Status=Ready,Description=Database Reference Profile 04-11-2014 12:40 PM from database.mycompany.com
Version : RMAN_04_11_2014_12_40_PM,contains=RMAN(s),removalOverdue=0, sourceDatabaseName=database.mycompany.com.

47.6.9 Refreshing a Database Profile Using EM CLI Verbs

This section describes the procedure to refresh a database profile using EM CLI verbs.

Figure 47-4 Refreshing a Database Profile Using EM CLI Verbs

Surrounding text describes Figure 47-4 .

Follow the steps below to refresh a database profile:

  1. Identify the location of the database profile component in the software library.

    Execute the following command to locate the database profile.

    emcli list_dbprofiles
    [-details]
    
    Sample command:
    emcli list_dbprofiles
    
    Sample output:
    Name=Profile_snap,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/
    Name=Profile_rman,Location=Database Provisioning Profiles/11.2.0.4.0/linux_x64/
    
  2. Refresh the database profile with the following command, using the obtained location.

    emcli refresh_dbprofile
        -comp_loc="Database Profile component location in software library"
    
    Sample command:
    emcli refresh_dbprofile -comp_loc="Database Provisioning Profiles/11.2.0.4.0/linux_x64/ Profile_snap"
    
    Sample output:
    A Refresh Single Profile procedure has been submitted successfully with the instance name :
    'RefreshSingleProfile_SYSMAN_07_22_2014_03_00_PM' and execution_guid= '0AE6096550756B26E0539878B10A6FF5'
    You can track the status of profile creation using the following command:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    
  3. Verify the status of the database profile refresh by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5
    
    Sample output:
    0AE6096550716B26E0539878B10A6FF5, PROFILE, RefreshSingleProfile_SYSMAN_07_22_2014_03_00_PM, Running
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -exe=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    

47.7 Service Template EM CLI Verbs

The table below lists the supported verbs for Service Template resource.

The .json file content samples are provided in Section 47.8, "Service Template Executable .json Files".

Table 47-17 Service Template EM CLI Verbs

Verb Description Format

emcli create_service_template

Creates a database, schema, or pluggable database service template.

The input_file should be a JSON based metadata file which should have the necessary configuration for the specific service template creation.

Samples of the JSON service executable metadata files are available at Section 47.8, "Service Template Executable .json Files".

Examples:

  • Database service template-

    emcli create_service_template
      -name="Database service template"
      -service_family="DBAAS"
      -service_type="DB"
      -pool_target_type="oracle_cloud_zone"
      -software_pools="MyPoolOH"
      -roles="SSA_USER_ROLE"
      -description="Database small instance service template."
      -input_file="data:executable.json"
    
    Sample Output:
    Service Template "My Service Template" created successfully
    
  • Schema service template-

    emcli create_service_template
      -name="Schema service template"
      -service_family="DBAAS"
      -service_type="SCHEMA"
      -pool_target_type="schaas_pool"
      -software_pools="MySCHPool"
      -roles="SSA_USER_ROLE"
      -description="Schema small instance service template."
      -input_file="data:executable.json
    
    Sample Output:
    Service Template "My Schema Service Template" created successfully
    
  • Pluggable database service template -

    emcli create_service_template
      -name="PDB service template"
      -service_family="DBAAS"
      -service_type="PDB"
      -pool_target_type="pdbaas_pool"
      -software_pools="MyPDBPool"
      -roles="SSA_USER_ROLE"
      -description="PDB small instance service template."
      -input_file="data:executable.json"
    
    Sample Output:
    Service Template "My PDB Service Template" created successfully. 
    

emcli create_service_template

-name="<Name of Service Template>"

-service_family="<Service family for which the Service Template is being created>"

-service_type="<Service type for which the Service Template is being created>"]

-pool_target_type="Target type of Software Pools to be associated with the Service Template"

-software_pools="<SwPool1,SwPool2,SwPool3,...>"

[-roles="<SsaRole1,SsaRole2,..>"]

[-description="<Description of Service Template>"]

[-input_file="data:<Name of Service executable MetaData File>"]

emcli delete_service_template

Deletes the Service template.

Example:

emcli delete_service_template
     -name="Database service template"
     -service_family="DBAAS"
Sample Output:
Service Template with name " Database service template " and service family " DBAAS " deleted successfully.

emcli delete_service_template

-name="<Name of Service Template>"]

-service_family="<Service family to which the Service Template belongs>"]

emcli get_service_templates

Retrieves the list of available service templates based on the service family passed.

Example:

emcli get_service_templates 
     -service_family="DBAAS"
Sample Output:
Name Service Family                      Description                                       
ServiceTemplate1                         DBAAS ServiceTemplate1Description                                                           

emcli get_service_templates

[-service_family="<Service family filter used for filtering the service templates>"]


47.8 Service Template Executable .json Files

Samples of Service Template executable .json files are listed below:

47.8.1 DBCA Based Service Template .json File

{
  "name": "Create ST for SI Db using DBCA Template - ASM Subh_2",
  "description": "Creates Single Instance DB",
  "roles": [ "SSA_USER_ROLE" ],
  "serviceType": "DB",
  "serviceTemplateTypeId": "61",
  "rscProvAssocOption": [ "byRscProvInst" ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [ "137F74D7A8359A60762ED550341A5F47" ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [ { "name": "PROFILE_COMPONENT_URN", "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:269BA6C90E6A5000E053C075B10A51A3:0.1" } ],
  "configurations": [
    { "name": "REF_ZONE", "value": "Salt Lake City Zone" },
    { "name": "REF_POOL", "value": "SI Databases Pool_Oracle_DB_11g" },
        { "name": "REF_HOST", "value": "xyz.example.com" },
        { "name": "REF_TGT", "value": "xyz.example.com" },
    { "name": "DBCA_TEMPLATE:DB_STORAGE_TYPE", "value": "ASM" },
    { "name": "DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value": "Y" },
    { "name": "DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE", "value": "4038" },
    { "name": "DBCA_TEMPLATE:DATA_FILE_LOCATION", "value": "DATA" },
    { "name": "DBCA_TEMPLATE:REDO_FILE_LOCATION", "value": "RECO" },
    { "name": "DBCA_TEMPLATE:ARCHIVE_LOG_MODE", "value": "Y" },
    { "name": "DBCA_TEMPLATE:RECOVERY_FILE_LOCATION", "value": "RECO" },
    { "name": "DATABASE_TYPE", "value": "oracle_database" },
    { "name": "COMMON_DOMAIN_NAME", "value": "us.example.com" },
    { "name": "ORACLE.SYSMAN.SSA.PROVISIONING_TYPE", "values": [ "DBCA_TEMPLATE" ] },
    { "name": "ENTITY_TYPE", "value": "USE_PROFILE" },
    { "name": "PROFILE_COMPONENT_URN", "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:269BA6C90E6A5000E053C075B10A51A3:0.1" },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY"
    },
    { "name": "SID_OPTION", "value": "ssauser" },
    { "name": "SELECT_ORACLE_HOME_OPTION", "value": "SELECT_ORACLE_HOME_AT_RUNTIME"},
    { "name": "COMMON_DB_SYS_PASSWORD", "value": "welcome"},
    { "name": "DB_ADMIN_PASSWORD_SAME", "value": "true" },
    { "name": "INIT_PARAMS", "values": [
        "sga_target=1073741824",
        "pga_aggregate_target=1073741824"
      ]
    },
    { "name": "LISTENER_PORT", "value": "1521" },
    { "name": "TARGET_PROP_LIST",
      "values": [
        "Site:null:false:false",
        "Contact:xxxx:false:true",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:Testing:false:true",
        "Line of Business:null:false:false"
      ]
    }
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.2 Standby DBCA Based Service Template .json File

{
"name":"TestDbTemplate1",
"serviceType":"DB",
"serviceFamily":"DBAAS",
"description":"This is a test database dbca service template 1",
"poolIds":[ "D125A1536E9ADC36CC24EAB058B9E7AC" ],
    "serviceExecutableMeta":{
"type":"CDP",
"configurations":[
 { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:F1EA40D2AE964994E0436051F20AFE32:0.1" },
 { "name":"DATABASE_TYPE","value":"rac_database" },
 { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
 { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
 { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
 { "name":"DB_ADMIN_PASSWORD_SAME", "value":"true" },
 { "name":"INSTANCE_COUNT","value":"2" },
 { "name":"SID_OPTION", "value":"ssauser  "},
 { "name":"COMMON_DB_SID","value":"mydb1" },
 { "name":"COMMON_DOMAIN_NAME",  "value":"us.example.com" },
 { "name":"LISTENER_PORT", "value":"1521"},
 { "name":"STAGE_LOCATION", "value":"/scratch" },
 { "name":"REF_ZONE", "value":"SLC00ECPQ_ZONE" },
 { "name":"REF_POOL",   "value":"PRIMARY_RAC_POOL" },
 { "name":"REF_HOST", "value":"xyxy.example.com" },
 { "name":"REF_TGT","value":"xxy.example.com" },
 { "name":"ROLE_NAME","value":"ROLE_Oct_31_2014_17_59_PM" },
 { "name":"ROLE_DESC","value":"New database role to be assigned to master account." },
 { "name":"USER_PRIVILEGES","value":"CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY" },
 { "name":"DEFAULT_DATABASE_SIZE","value":"small" },
 { "name":"DATABASE_SIZES","value":"","values":["small","medium"]},
 { "name":"TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false",
      "Location:null:false:false",
      "Comment:null:false:false",
      "LifeCycle Status:null:false:false",
     "Line of Business:null:false:false",
     "Contact:null:false:false"]
        },
 { "name":"CUSTOM_TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false
            ]
        },
 { "name":"DBCA_TEMPLATE:DB_STORAGE_TYPE",  "value":"ASM" },
 { "name":"DBCA_TEMPLATE:DATA_FILE_LOCATION","value":"DATA" },
 { "name":"DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
 { "name":"DBCA_TEMPLATE:ARCHIVE_LOG_MODE", "value":"Y" },
 { "name":"DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE", "value":"2048" },
 { "name":"DBCA_TEMPLATE:RECOVERY_FILE_LOCATION","value":"RECO" },
 { "name":"DBCA_TEMPLATE:REDO_FILE_LOCATION", "value":"RECO"  },
 {
"name":"INIT_PARAMS",
"subconfigurations":[
   { "name":"INIT_PARAMS:1", "value":"sga_target=1073741824" },
   { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=1073741824"  }
]
 },
{ "name":"STANDBY_REQUIRED","value":"true" },
{ "name":"STANDBY_REQUIRED_LOCK","value":"false" },
{ "name":"STANDBY_WORK_DIR","value":"/tmp" },
{ "name":"PRIMARY_PROTECTION_MODE","value":"MAXIMIZE AVAILABILITY" },
{ "name":"DBAAS_SSA_STANDBY_CUSTOM_PRE_SCRIPTS_URN","value":"" },
{ "name":"DBAAS_SSA_STANDBY_CUSTOM_POST_SCRIPTS_URN","value":"" },
{ "name":"STANDBY_DB_DETAILS","value":"","values":[
"pool=RAC_11204_Tier_2;databaseSIDPrefix=;databaseType=rac_database;standbyConfigName=Near DR;redoMode=SYNC;realtimeQuery=true;databaseRACInstanceCount=2;databaseDelay=30;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com",
"pool=SI_11204;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Far DR;redoMode=ASYNC;realtimeQuery=false;databaseRACInstanceCount=2;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"]}
 
  ]
    }
}

47.8.3 RMAN Based Single Instance Database Service Template .json File

{
  "name": "Database Service - RMAN Based with archiving with SI Standby",
  "description": "This creates Database Archiving log mode.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "1898CF93BD39C19BF032672271BC4B44"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    }
  ],
  "configurations": [
    {
      "name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    },
    {
      "name": "SELECT_ORACLE_HOME_OPTION",
      "value": "SELECT_ORACLE_HOME_FROM_REQUEST"
    },
    {
      "name": "REF_TGT",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_ZONE",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "zoneTargetName",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "REF_POOL",
      "value": "Databases Pool"
    },
    {
      "name": "DATABASE_TYPE",
      "value": "oracle_database"
    },
    {
      "name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"
    },
    {
      "name": "LISTENER_PORT",
      "value": "1521"
    },
    {
      "name": "PROFILE_VERSION",
      "value": "latest"
    },
    {
      "name": "COMMON_DB_SID",
      "value": "db"
    },
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"
    },
    {
      "name": "RMAN.DB_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_SIZE",
      "value": "4038"
    },
    {
      "name": "RMAN.USE_ARCHIVING",
      "value": "YES"
    },
    {
      "name": "RMAN.DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"
    },
    {
      "name": "RMAN.REDO_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.RECOVERY_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.WORK_DIR_LOC",
      "value": "/tmp/work"
    },
    {
      "name": "RMAN.DB_ADMIN_PASSWORD_SAME",
      "value": "Y"
    },
    {
      "name": "RMAN.DATABASE_PASSWORDS",
      "value": "welcome"
    },
    {
      "name": "RMAN.BACKUP_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "RMAN.USE_OFA",
      "value": "N"
    },
    {
      "name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"
    },
    {
      "name": "STANDBY_DB_DETAILS",
      "values": [
        "pool=Near DR Pool;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"
      ]
    }
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.4 RMAN Based Single Instance Database with Single Instance Standby Service Template .json File

{
  "name": "Database Service - RMAN Based with archiving with SI Standby",
  "description": "This creates Database Archiving log mode.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "1898CF93BD39C19BF032672271BC4B44"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    }
  ],
  "configurations": [
    {
      "name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
    },
    {
      "name": "SELECT_ORACLE_HOME_OPTION",
      "value": "SELECT_ORACLE_HOME_FROM_REQUEST"
    },
    {
      "name": "REF_TGT",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_ZONE",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "zoneTargetName",
      "value": "Salt Lake City Zone"
    },
    {
      "name": "REF_POOL",
      "value": "Databases Pool"
    },
    {
      "name": "DATABASE_TYPE",
      "value": "oracle_database"
    },
    {
      "name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"
    },
    {
      "name": "LISTENER_PORT",
      "value": "1521"
    },
    {
      "name": "PROFILE_VERSION",
      "value": "latest"
    },
    {
      "name": "COMMON_DB_SID",
      "value": "db"
    },
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"
    },
    {
      "name": "RMAN.DB_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_STORAGE_TYPE",
      "value": "FS"
    },
    {
      "name": "RMAN.FRA_SIZE",
      "value": "4038"
    },
    {
      "name": "RMAN.USE_ARCHIVING",
      "value": "YES"
    },
    {
      "name": "RMAN.DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"
    },
    {
      "name": "RMAN.REDO_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.RECOVERY_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/fast_recovery_area"
    },
    {
      "name": "RMAN.WORK_DIR_LOC",
      "value": "/tmp/work"
    },
    {
      "name": "RMAN.DB_ADMIN_PASSWORD_SAME",
      "value": "Y"
    },
    {
      "name": "RMAN.DATABASE_PASSWORDS",
      "value": "welcome"
    },
    {
      "name": "RMAN.BACKUP_LOCATION",
      "value": "/scratch/emga/backups/rman/"
    },
    {
      "name": "RMAN.USE_OFA",
      "value": "N"
    },
    {
      "name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"
    },
    {
      "name": "STANDBY_DB_DETAILS",
      "values": [
        "pool=Near DR Pool;databaseSIDPrefix=;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"
      ]
    }
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.5 RMAN Based RAC One Node Database Service Template .json File

{
  "name": "Create Databases on RAC One database",
  "description": "Creates Databases on RAC.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "647E8750A1C3835557165B499B269FB3"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"
    }
  ],
  "configurations": [
    {"name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"},
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"},
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name": "REF_TGT",
      "value": "abc.example.com"},
    {"name": "REF_HOST",
      "value": "adc.example.com"},
    {"name": "REF_ZONE",
      "value": "Salt Lake City Zone"},
    {"name": "zoneTargetName",
      "value": "Salt Lake City Zone"},
    {"name": "REF_POOL",
      "value": "RAC Databases Pool"},
    {"name": "DATABASE_TYPE",
      "value": "rac_database"},
    {"name": "IS_RAC_ONE",
      "value": "Y"},
    {"name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"},
    {"name": "LISTENER_PORT",
      "value": "1521"},
    {"name": "PROFILE_VERSION",
      "value": "latest"},
    {"name": "COMMON_DB_SID",
      "value": "db"},
    {"name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {"name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"},
    {"name": "RMAN:DB_STORAGE_TYPE",
      "value": "FS"},
    {"name": "RMAN:FRA_SIZE",
      "value": "4038"},
    {"name": "RMAN:USE_ARCHIVING",
      "value": "NO"},
    {"name": "RMAN:DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"},
    {"name": "RMAN:WORK_DIR_LOC",
      "value": "/tmp/work"},
    {"name": "RMAN:DB_ADMIN_PASSWORD_SAME",
      "value": "Y"},
    {"name": "RMAN:DATABASE_PASSWORDS",
      "value": "welcome"},
    {"name": "RMAN:BACKUP_LOCATION",
      "value": "/oradbnas/backups/rman/"},
    {"name": "RMAN:USE_OFA",
      "value": "N"},
    {"name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"}
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.6 RMAN Based RAC One Node Database with Standby Service Template .json File

{
  "name": "RAC One Database Provisioning with RAC One Standby and SI Standby",
  "description": "Creates RAC One Databases with RAC One Standby and SI Standby.",
  "serviceType": "DB",
  "serviceTemplateTypeId": "81",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "647E8750A1C3835557165B499B269FB3"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"}
  ],
  "configurations": [
    {"name": "STAGE_LOCATION",
      "value": "/scratch/emga/backups/rman/"},
    {"name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"},
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name": "REF_TGT",
      "value": "adc.example.com"},
    {"name": "REF_HOST",
      "value": "adc.example.com"},
    {"name": "REF_ZONE",
      "value": "Salt Lake City Zone"},
    {"name": "zoneTargetName",
      "value": "Salt Lake City Zone"},
    {"name": "REF_POOL",
      "value": "RAC Databases Pool"},
    {"name": "DATABASE_TYPE",
      "value": "rac_database"},
    {"name": "IS_RAC_ONE",
      "value": "Y"},
    {"name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome"},
    {"name": "LISTENER_PORT",
      "value": "1521"},
    {"name": "PROFILE_VERSION",
      "value": "latest"},
    {"name": "COMMON_DB_SID",
      "value": "db"},
    {"name": "TARGET_PROP_LIST",
      "values": [
        "Contact:9980697299:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:null:false:false",
        "Comment:null:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {"name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"},
    {"name": "RMAN:DB_STORAGE_TYPE",
      "value": "FS"},
    {"name": "RMAN:FRA_SIZE",
      "value": "4038"},
    {"name": "RMAN:USE_ARCHIVING",
      "value": "NO"},
    {"name": "RMAN:DATA_FILE_LOCATION",
      "value": "/scratch/emga/app/emga/oradata"},
    {"name": "RMAN:WORK_DIR_LOC",
      "value": "/tmp/work"},
    {"name": "RMAN:DB_ADMIN_PASSWORD_SAME",
      "value": "Y"},
    {"name": "RMAN:DATABASE_PASSWORDS",
      "value": "welcome"},
    {"name": "RMAN:BACKUP_LOCATION",
      "value": "/oradbnas/backups/rman/"},,
    {"name": "RMAN:USE_OFA",
      "value": "N"},
    {"name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"},
{"name": "STANDBY_REQUIRED",
   "value": "true"},
  {"name": "STANDBY_DB_DETAILS",
   "value": "",
   "values": [
        "pool=SI Databases Zone - Oracle 11g - Standby;databaseSIDPrefix=st;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"
      ]
    }
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.7 RMAN Based RAC Database with Single Instance Standby Service Template .json File

{
  "name" : "Create Databases on RAC with SI  Standby",
  "description" : "Creates Databases on RAC.",
  "serviceType" : "DB",
  "serviceTemplateTypeId" : "81",
  "rscProvAssocOption" : [ "byRscProvInst" ],
  "resourceProvider" : {
    "lookupCharacteristics" : [ {
      "characteristics" : [ {
        "name" : "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
        "values" : [ "647E8750A1C3835557165B499B269FB3" ],
        "targetType" : {
          "targetType" : "oracle_cloud_zone",
          "targetTypeName" : "Database Pool",
          "parentTargetType" : "self_service_zone",
          "parentTargetTypeName" : "PaaS Infrastructure Zone"
        }
      } ],
      "purposeId" : 1
    } ]
  },
  "payloads" : [ {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"
  } ],
  "configurations" : [ {
    "name" : "STAGE_LOCATION",
    "value" : "/scratch/emga/backups/rman/"},
    {"name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1E4F60D72C912160E053C075B10A29F5:0.1"}
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name" : "REF_TGT",
    "value" : "adc.us.example.com"},
    {"name" : "REF_HOST",
    "value" : "adc.us.example.com"},
    {"name" : "REF_ZONE",
    "value" : "Salt Lake City Zone"},
    {"name" : "zoneTargetName",
    "value" : "Salt Lake City Zone"},
    {"name" : "REF_POOL",
    "value" : "RAC Databases Pool"},
    {"name" : "DATABASE_TYPE",
    "value" : "oracle_database"},
    {"name" : "COMMON_DB_SYS_PASSWORD",
    "value" : "welcome"},
    {"name" : "LISTENER_PORT",
    "value" : "1521"},
    {"name" : "PROFILE_VERSION",
    "value" : "latest"},
    {"name" : "COMMON_DB_SID",
    "value" : "db"},
    {"name" : "TARGET_PROP_LIST",
    "values" : [ "Contact:9980697299:false:false", "Location:null:false:false", "LifeCycle Status:null:false:false", "Department:null:false:false", "Comment:null:false:false", "Line of Business:null:false:false" ]},
    {"name" : "USER_PRIVILEGES",
    "value" : "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"},
    {"name" : "RMAN:DB_STORAGE_TYPE",
    "value" : "FS"},
    {"name" : "RMAN:FRA_SIZE",
    "value" : "4038"},
    {"name" : "RMAN:USE_ARCHIVING",
    "value" : "NO"},
    {"name" : "RMAN:DATA_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/oradata"},
    {"name" : "RMAN:WORK_DIR_LOC",
    "value" : "/tmp/work"},
    {"name" : "RMAN:DB_ADMIN_PASSWORD_SAME",
    "value" : "Y"},
    {"name" : "RMAN:DATABASE_PASSWORDS",
    "value" : "welcome"},
    {"name" : "RMAN:BACKUP_LOCATION",
    "value" : "/oradbnas/backups/rman/"},
    {"name" : "RMAN:USE_OFA",
    "value" : "N"},
    {"name" : "COMMON_DOMAIN_NAME",
    "value" : "us.example.com"},
    {"name":"CUSTOM_PRE_CREATE_SCRIPTS_URN",
    "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},,
    {"name":"CUSTOM_POST_CREATE_SCRIPTS_URN",
    "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},,
   {"name": "STANDBY_REQUIRED",
    "value": "true"},
   {"name": "STANDBY_DB_DETAILS",
    "value": "",
    "values": [
        "pool=SI Databases Zone - Oracle 11g - Standby;databaseSIDPrefix=st;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"
      ]
    }
]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.8 RAC Database with Standby Using a DBCA Template Service Template .json File

{
  "name": "Create RAC Db with Standby using DBCA Template - BofA -ASM",
  "description": "Service Template for Non-CDB; 12cR1_2(12.1.0.2); RAC; ASM",
  "serviceType": "DB",
  "serviceTemplateTypeId": "61",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "roles": [
    "SSAUSERROLE"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
            "values": [
              "4C5795E605D71F59BAF9F6AD702E25E1"
            ],
            "targetType": {
              "targetType": "oracle_cloud_zone",
              "targetTypeName": "Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:246E84D11ED13BD0E050F90AE5852BC8:0.1"
    }
  ],
  "configurations": [
    {
      "name": "REF_ZONE",
      "value": "Clusters Zone - Oracle DB 12c"
    },
    {
      "name": "REF_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_POOL",
      "value": "RAC Databases Pool_Oracle_DB_12c"
    },
    {
      "name": "DBCA_TEMPLATE:DB_STORAGE_TYPE",
      "value": "ASM"
    },
    {
      "name": "DBCA_TEMPLATE:REC_STORAGE_TYPE_SAME_AS_DB_FILES",
      "value": "Y"
    },
    {
      "name": "DBCA_TEMPLATE:ARCHIVE_LOG_MODE",
      "value": "N"
    },
    {
      "name": "DBCA_TEMPLATE:FLASH_RECOVERY_AREA_SIZE",
      "value": "4038"
    },
    {
      "name": "DBCA_TEMPLATE:DATA_FILE_LOCATION",
      "value": "DATA"
    },
    {
      "name": "DBCA_TEMPLATE:REDO_FILE_LOCATION",
      "value": "DATA1"
    },
    {
      "name": "DBCA_TEMPLATE:RECOVERY_FILE_LOCATION",
      "value": "DATA1"
    },
    {
      "name": "DATABASE_TYPE",
      "value": "rac_database"
    },
    {
      "name": "INSTANCE_COUNT",
      "value": "2"
    },
    {
      "name": "COMMON_DOMAIN_NAME",
      "value": "us.example.com"
    },
    {
      "name": "ORACLE.SYSMAN.SSA.PROVISIONING_TYPE",
      "values": [
        "DBCA_TEMPLATE"
      ]
    },
    {
      "name": "ENTITY_TYPE",
      "value": "USE_PROFILE"
    },
    {
      "name": "REF_TGT",
      "value": "xyz.example.com"
    },
    {
      "name": "SID_OPTION",
      "value": "prefix"
    },
    {
      "name": "PROFILE_COMPONENT_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:246E84D11ED13BD0E050F90AE5852BC8:0.1"
    },
    {
      "name": "PROFILE_VERSION",
      "value": "latest"
    },
    {
      "name": "USER_PRIVILEGES",
      "value": "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY"
    },
    {
      "name": "COMMON_DB_SID",
      "value": "RFTDB"
    },
    {
      "name": "INIT_PARAMS",
      "subconfigurations": [
        "sga_target=1073741824",
        "pga_aggregate_target=1073741824"
      ]
    },
    {
      "name": "SELECT_ORACLE_HOME_OPTION",
      "value": "SELECT_ORACLE_HOME_AT_RUNTIME"
    },
    {
      "name": "COMMON_DB_SYS_PASSWORD",
      "value": "welcome1"
    },
    {
      "name": "DB_ADMIN_PASSWORD_SAME",
      "value": "true"
    },
    {
      "name": "LISTENER_PORT",
      "value": "1521"
    },
    {
      "name": "STANDBY_REQUIRED",
      "value": "true"
    },
    {
      "name": "STANDBY_DB_DETAILS",
      "value": "",
      "values": [
        "pool=SI Databases Zone - Oracle 11g - Standby;databaseSIDPrefix=st;databaseType=oracle_database;standbyConfigName=Near DR;redoMode=ASYNC;realtimeQuery=false;databaseDelay=60;databaseUniqueName=;standbyStorageType=FS;standbyStorageLocation=;standbyFRAType=FS;standbyFRALocation=;standbyFRASize=;standbyLsnrPort=;domainName=us.example.com"
      ]
    },
    {
      "name": "DATABASE_SIZES",
      "values": [
        "Big",
        "Small"
      ]
    },
    {
      "name": "DEFAULT_DATABASE_SIZE",
      "value": "Big"
    }
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.9 DNFS Based Database Service Template .json File

{
  "name" : "DB Clones",
  "description" : "This clones a database based on NFS.",
  "serviceType" : "DB",
  "serviceTemplateTypeId" : "81",
  "rscProvAssocOption" : [ "byRscProvInst" ],
  "resourceProvider" : {
    "lookupCharacteristics" : [ {
      "characteristics" : [ {
        "name" : "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
        "values" : [ "1898CF93BD39C19BF032672271BC4B44" ],
        "targetType" : {
          "targetType" : "oracle_cloud_zone",
          "targetTypeName" : "Database Pool",
          "parentTargetType" : "self_service_zone",
          "parentTargetTypeName" : "PaaS Infrastructure Zone"
        }
      } ],
      "purposeId" : 1
    } ]
  },
  "payloads" : [ {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"
  } ],
  "configurations" : [ {
    "name" : "STAGE_LOCATION",
    "value" : "/scratch/emga/backups/rman/"}
    {"name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:1C14BB2B2E127E23E053C075B10AE31F:0.1"}
    {"name":"SELECT_ORACLE_HOME_OPTION",
     "value":"SELECT_ORACLE_HOME_FROM_REQUEST"},
    {"name" : "REF_TGT",
    "value" : "abc.example.com"}
    {"name" : "REF_HOST",
    "value" : "abc.example.com"}
    {"name" : "REF_ZONE",
    "value" : "Salt Lake City Zone"}
    {"name" : "zoneTargetName",
    "value" : "Salt Lake City Zone"}
    {"name" : "REF_POOL",
    "value" : "Databases Pool"}
    {"name" : "DATABASE_TYPE",
    "value" : "oracle_database"}
    {"name" : "COMMON_DB_SYS_PASSWORD",
    "value" : "welcome"}
    {"name" : "LISTENER_PORT",
    "value" : "1521"}
    {"name" : "PROFILE_VERSION",
    "value" : "latest"}
    {"name" : "COMMON_DB_SID",
    "value" : "db"}
    {"name" : "TARGET_PROP_LIST",
    "values" : [ "Contact:9980697299:false:false", "Location:null:false:false", "LifeCycle Status:null:false:false", "Department:null:false:false", "Comment:null:false:false", "Line of Business:null:false:false" ]}
    {"name" : "USER_PRIVILEGES",
    "value" : "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"}
    {"name" : "DNFS.DATA_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/oradata"}
    {"name" : "DNFS.REDO_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/fast_recovery_area"}
    {"name" : "DNFS.RECOVERY_FILE_LOCATION",
    "value" : "/scratch/emga/app/emga/fast_recovery_area"}
    {"name" : "DNFS.FRA_SIZE",
    "value" : "4038"}
    {"name" : "DNFS.USE_ARCHIVING",
    "value" : "YES"}
    {"name" : "DNFS.WORK_DIR_LOC",
    "value" : "/tmp/work"}
    {"name" : "DNFS.DB_ADMIN_PASSWORD_SAME",
    "value" : "Y"}
    {"name" : "DNFS.BACKUP_LOCATION",
    "value" : "/scratch/emga/backups/rman_image/"}
    {"name" : "DNFS.USE_OFA",
    "value" : "N"}
    {"name" : "COMMON_DOMAIN_NAME",
    "value" : "us.example.com"} ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.10 Snap Clone Single Instance Database with Archiving Enabled Service Template .json File

{
  "name" : "Create Snap Database using Snapshots",
  "description" : "Creates Databases on SI hosts.",
  "serviceType" : "DB",
  "serviceTemplateTypeId" : "81",
  "rscProvAssocOption" : [ "byRscProvInst" ],
  "resourceProvider" : {
    "lookupCharacteristics" : [ {
      "characteristics" : [ {
        "name" : "ORACLE.SYSMAN.SSA.ORACLE_CLOUD_ZONE",
        "values" : [ "503073C7912B1C65B66E240C433012A9" ],
        "targetType" : {
          "targetType" : "oracle_cloud_zone",
          "targetTypeName" : "Database Pool",
          "parentTargetType" : "self_service_zone",
          "parentTargetTypeName" : "PaaS Infrastructure Zone"
        }
      } ],
      "purposeId" : 1
    } ]
  },
  "payloads" : [ {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:247BF4B378FF253FE053C075B10A794A:0.1"
  } ],
  "configurations" : [ {
    "name" : "STAGE_LOCATION",
    "value" : "/scratch/emga/backups/rman/"
  }, {
    "name" : "PROFILE_COMPONENT_URN",
    "value" : "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:247BF4B378FF253FE053C075B10A794A:0.1"
  }, {
    "name" : "REF_TGT",
    "value" : "xyz.example.com"
  }, {
    "name" : "REF_HOST",
    "value" : "xyz.example.com"
  }, {
    "name" : "REF_ZONE",
    "value" : "Single Instances Zone"
  }, {
    "name" : "zoneTargetName",
    "value" : "Single Instances Zone"
  }, {
    "name" : "REF_POOL",
    "value" : "SI Databases Pool - Version 11_2_0_4"
  }, {
    "name" : "DATABASE_TYPE",
    "value" : "oracle_database"
  }, {
    "name" : "COMMON_DB_SYS_PASSWORD",
    "value" : "welcome"
  }, {
    "name" : "LISTENER_PORT",
    "value" : "1521"
  }, {
    "name" : "PROFILE_VERSION",
    "value" : "latest"
  }, {
    "name" : "COMMON_DB_SID",
    "value" : "db"
  }, {
    "name" : "TARGET_PROP_LIST",
    "values" : [ "Contact:9980697299:false:false", "Location:null:false:false", "LifeCycle Status:null:false:false", "Department:null:false:false", "Comment:null:false:false", "Line of Business:null:false:false" ]
  }, {
    "name" : "USER_PRIVILEGES",
    "value" : "CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE"
  }, {
    "name" : "THIN_PROVISIONING:LISTENER_PORT",
    "value" : "1522"
  }, {
    "name" : "THIN_PROVISIONING:REDO_LOG_GROUP_COUNT",
    "value" : "2"
  }, {
    "name" : "THIN_PROVISIONING:TEMP_TABLESPACE_SIZE",
    "value" : "520"
  }, {
    "name" : "THIN_PROVISIONING:USE_ARCHIVING",
    "value" : "YES"
  }, {
    "name" : "THIN_PROVISIONING:MOUNT_POINT_LIST",
    "values" : [ "/hkdb" ]
  }, {
    "name" : "THIN_PROVISIONING:MOUNT_ADDL_SIZE_LIST",
    "values" : [ "5.0" ]
  }, {
    "name" : "THIN_PROVISIONING:REDO_LOG_FILE_TYPE",
    "value" : "Same as source"
  }, {
    "name" : "INIT_PARAMS",
    "values" : [ "sga_target=1073741824", "pga_aggregate_target=1073741824" ]
  }, {
    "name" : "COMMON_DOMAIN_NAME",
    "value" : "us.example.com"
  } ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "DBAAS_SSA_CUSTOM_PRE_SCRIPTS_URN" and "DBAAS_SSA_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "values" (under "lookupCharacteristics"), execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_HOST indicates the host of the reference target from the pool targets.

  • REF_TGT indicates the reference target from the pool targets.

  • SELECT_ORACLE_HOME_OPTION allows the Oracle home to be automatically selected by entering the value as SELECT_ORACLE_HOME_AT_RUNTIME, or to be selected by the SSA user by entering the value as SELECT_ORACLE_HOME_FROM_REQUEST.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.11 Schema Based Service Template .json File

{
                "name":"TestSchaasTemplate3",
                "serviceType":"SCHEMA",
                "serviceFamily":"DBAAS",
                "description":"This is a test schaas service template 1",
                "poolIds":[ "9D3187DE6B1115791D71D2827FB98558" ],
                "roles":[
                        { "name":"SSA_USER_ROLE1" }
                ],
           "serviceExecutableMeta":{
                "type":"CDP",
                "configurations":[
                { "name":"ROLE_NAME", "value":"SampleRole" },
                { "name":"MAX_NUMBER_OF_SCHEMAS","value":"2" },
                { "name":"ENFORCE_STORAGE_CONSTRAINT","value":"NO_LIMIT" },
                { "name":"AUTO_EXTEND_BLOCK_SIZE","value":"1024" },
                { "name":"REF_ZONE","value":"ABC_ZONE" },
                { "name":"REF_POOL","value":"SCH_POOL" },
                { "name":"REF_HOST","value":"abc.mycompany.com" },
                { "name":"REF_DB","value":"simple.us.example.com" },
                { "name":"CREATE_SCHEMA_OPTION","value":"EMPTY_SCHEMAS" },
                { "name":"SCHAAS_CUSTOM_PRE_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
                { "name":"SCHAAS_CUSTOM_POST_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
                { 
                   "name":"REMAP_TABLESPACE_LIST",
                   "value":"",
                   "values":["TBSP1","TBSP2","TBSP3"]
                },
                { 
                   "name":"REMAP_TABLESPACE_INIT_SIZE_LIST",
                   "value":"",
                   "values":["TBSP1:0.1","TBSP2:0.2","TBSP3:0.3"]
                },
                { 
                   "name":"REMAP_TABLESPACE_INCR_SIZE_LIST",
                   "value":"",
                   "values":["TBSP1:0.1","TBSP2:0.2","TBSP3:0.3"]
                },
                { 
                   "name":"REMAP_TABLESPACE_MAX_SIZE_LIST",
                   "value":"",
                   "values":["TBSP1:50.0","TBSP2:30","TBSP3:20"]
                },               
        
                { "name":"CREATE_SCHEMA_OPTION","value":"EMPTY_SCHEMAS" },
                                {
                "name":"WORKLOADS",
                "subconfigurations":[                    
                {
                "name":"WORK_LOADS:1",
                "subconfigurations":[
                { "name":"name",  "value":"large "  },
                { "name":"description", "value":"large workload" },
                {   "name":"default",    "value":"Y" },
                {   "name":"CPU",  "value":"6" },
                {   "name":"Memory", "value":"4048"    },
                {   "name":"Storage", "value":"2024"   }
                ]
        }
        ]
        }
        ]
        }
        }

47.8.12 Pluggable Database Service Template .json File

{
    "name":"TestPDbTemplate1",
    "serviceType":"PDB",
    "serviceFamily":"DBAAS",
    "description":"This is a test pluggable database service template 1",
    "poolIds":[ "FF394120842D8C71CC92BE6A4D5A488E" ],     
    "roles":[
        { "name":"SSA_USER_ROLE1" }
    ],
   "serviceExecutableMeta":{
        "type":"CDP",
        "configurations":[
         {
            "name":"TABLESPACE_ENCRYPTION_ALGORITHM",
            "subconfigurations":[
               {  "name":"name", "value":"NONE" }
            ]
         },
         {  "name":"MAX_TABLESPACE_ALLOWED", "value":"2" },
         {  "name":"PDB_SID_PREFIX", "value":"mypdb" },
         {  "name":"ENFORCE_STORAGE_CONSTRAINT", "value":"NO_LIMIT" },
         {  "name":"AUTO_EXTEND_BLOCK_SIZE","value":"1024" },
         {  "name":"REF_DATA_ZONE", "value":"PDB_Zone" },             
         {  "name":"REF_DATA_TARGET", "value":"database" },          
         {  "name":"REF_DATA_TARGET_TYPE", "value":"oracle_database" },                
         {  "name":"REF_DATA_POOL","value":"PDB_POOL" },
         {  "name":"REF_DATA_HOST", "value":"abc.mycompany.com" },
  {  "name":"SELECT_TARGET_OPTION", "value":"SELECT_TARGET_FROM_REQUEST" },
         {  "name":"CREATE_PDB_OPTION", "value":"EMPTY_PDB" },
         {"name":"PDBAAS_CUSTOM_PRE_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
         {"name":"PDBAAS_CUSTOM_POST_SCRIPTS_URN","value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1"},
    {  "name":"PRIVILEGES",
               "value":"",            
               "values":["CREATE TYPE","CREATE VIEW","CREATE DIMENSION","CREATE SESSION","CREATE TRIGGER","CREATE OPERATOR","CREATE SYNONYM","CREATE TABLE","CREATE PROCEDURE","CREATE INDEXTYPE","CREATE SEQUENCE"]
            },
         {  "name":"ROLE_OPTION","value":"CUSTOM_NEW_ROLE" },
         {
            "name":"INIT_PARAMS",
            "subconfigurations":[
               { "name":"INIT_PARAMS:1", "value":"*.cursor_sharing=EXACT" },
               { "name":"INIT_PARAMS:2", "value":"*.open_cursors=200"  }
            ]
         },
                 {
            "name":"WORKLOADS",
            "subconfigurations":[
               {
                  "name":"WORK_LOADS:1",
                  "subconfigurations":[
                     { "name":"name", "value":"SmallPdb" },
                     { "name":"description", "value":"small workload" },
                     {  "name":"default", "value":"N" },
                     {  "name":"CPU", "value":"2" },
                     {  "name":"Memory", "value":"2048" },
                     {  "name":"Storage", "value":"1024" },
                     {  "name":"Sessions", "value":"100" }
                  ]
               }
            ]
         }
      ]
   }
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "PDBAAS_CUSTOM_PRE_SCRIPTS_URN" and "PDBAAS_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_DATA_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "poolIds", execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_DATA_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_DATA_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_DATA_HOST indicates the host of the reference target from the pool targets.

  • REF_DATA_TARGET indicates the reference target from the pool targets.

  • In the table above, the SELECT_TARGET_OPTION parameter defines if the SSA User has the option to select the Container Database (CDB) while requesting for a PDB. If the value for the parameter is set as SELECT_TARGET_FROM_REQUEST, then the SSA User has the option to choose the CDB. If no value is defined, or if the value is set to SELECT_TARGET_AT_RUNTIME, then the placement algorithm selects the CDB.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.13 RAC Pluggable Database Using an Empty Pluggable Database Service Template .json File

{
  "name": "Create RAC PDBs using empty PDB option",
  "description": "Creates PDBs on cluster.",
  "serviceType": "PDB",
  "serviceTemplateTypeId": "94",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "roles": [
    "SSA_USER_ROLE"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.PDBAAS_POOL",
            "values": [
              "DFB8F2A53429AF99EF2020C56E11FEE9"
            ],
            "targetType": {
              "targetType": "pdbaas_pool",
              "targetTypeName": "Pluggable Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "DBDELETE_PRESCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D511C1CFFE053C075B10AEF2D:0.1"
    },
    {
      "name": "DBDELETE_POSTSCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D51201CFFE053C075B10AEF2D:0.1"
    }
  ],
  "characteristics": [
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DEPARTMENT",
      "displayName": "Department",
      "value": "Development",
      "required": true,
      "editable": false,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LOCATION",
      "displayName": "Location",
      "values": "Bangalore",
      "required": false,
      "editable": true,
      "visible": true
    }
  ],
  "configurations": [
    {
      "name": "REF_DATA_ZONE",
      "value": "Single Instances Zone"
    },
    {
{
"name":SELECT_TARGET_OPTION"
"value":SELECT_TARGET_FROM_REQUEST"
},
      "name": "CUSTOM_ROLE_NAME",
      "value": "PDBAAS_NOV_13_2015_16_51_PM"
    },
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Site:null:false:false",
        "Contact:null:false:false",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:Development:true:true",
        "Comment:This is for testing:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "PDBAAS_CUSTOM_PRE_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7B4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "WORKLOADS",
      "subvalues": [
        {
          "name": "Small",
          "subvalues": [
            {
              "name": "name",
              "value": "SmallPdb"
            },
            {
              "name": "description",
              "value": "small workload"
            },
            {
              "name": "default",
              "value": "N"
            },
            {
              "name": "CPU",
              "value": "2"
            },
            {
              "name": "Memory",
              "value": "2"
            },
            {
              "name": "Storage",
              "value": "5"
            },
            {
              "name": "Sessions",
              "value": "100"
            }
          ]
        }
      ]
    },
    {
      "name": "PRIVILEGES",
      "type": "VECTOR",
      "description": "List of privileges of custom new role that will be applied on pluggable database administrator.",
      "displayName": "PRIVILEGES",
      "required": false,
      "secret": false,
      "values": [
        "CREATE SESSION",
        "ALTER SESSION",
        "CREATE DIMENSION",
        "CREATE INDEXTYPE",
        "CREATE ANY OPERATOR",
        "CREATE ANY PROCEDURE",
        "CREATE ANY SEQUENCE",
        "CREATE ANY INDEX",
        "CREATE JOB",
        "CREATE ANY MATERIALIZED VIEW",
        "CREATE ANY TABLE",
        "CREATE ANY TRIGGER",
        "CREATE ANY TYPE",
        "CREATE ANY VIEW",
        "CREATE ANY SYNONYM",
        "CREATE ANY DIRECTORY",
        "SELECT ANY DICTIONARY",
        "SELECT ANY TABLE"
      ]
    },
    {
      "name": "REF_DATA_TARGET_TYPE",
      "value": "rac_database"
    },
        {
      "name": "REF_DATA_ZONE",
          "value": "Clusters Zone - Oracle DB 12c"
          },
    {
      "name": "REF_DATA_HOST",
      "value": "xyz.example.com"
    },
        {
      "name": "REF_DATA_TARGET",
      "value": "cdbfs"
    },
        {
      "name": "REF_DATA_POOL",
      "value": "RAC Pluggable DBs"
    },
    {
      "name": "PDBAAS_CUSTOM_POST_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7F4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "SELECT_TARGET_OPTION",
      "value": "SELECT_TARGET_AT_RUNTIME"
    },
    {
      "name": "MAX_TABLESPACE_ALLOWED",
      "value": "1"
    },
    
    
    {
      "name": "ROLE_OPTION",
      "value": "CUSTOM_NEW_ROLE"
    },
    {
      "name": "CREATE_PDB_OPTION",
      "value": "EMPTY_PDB"
    },{
      "name": "INIT_PARAMS",
    "values": [
        "*.cursor_sharing=EXACT",
        "*.open_cursors=300"
      ]
}
 
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "PDBAAS_CUSTOM_PRE_SCRIPTS_URN" and "PDBAAS_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_DATA_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "poolIds", execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_DATA_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_DATA_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_DATA_HOST indicates the host of the reference target from the pool targets.

  • REF_DATA_TARGET indicates the reference target from the pool targets.

  • In the table above, the SELECT_TARGET_OPTION parameter defines if the SSA User has the option to select the Container Database (CDB) while requesting for a PDB. If the value for the parameter is set as SELECT_TARGET_FROM_REQUEST, then the SSA User has the option to choose the CDB. If no value is defined, or if the value is set to SELECT_TARGET_AT_RUNTIME, then the placement algorithm selects the CDB.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.14 RAC Pluggable Database Using a Profile Pluggable Database Service Template .json File

{
  "name": "Create RAC PDBs using Profile PDB option",
  "description": "Creates PDBs on cluster.",
  "serviceType": "PDB",
  "serviceTemplateTypeId": "94",
  "rscProvAssocOption": [
    "byRscProvInst"
  ],
  "roles": [
    "SSA_USER_ROLE"
  ],
  "resourceProvider": {
    "lookupCharacteristics": [
      {
        "characteristics": [
          {
            "name": "ORACLE.SYSMAN.SSA.PDBAAS_POOL",
            "values": [
              "DFB8F2A53429AF99EF2020C56E11FEE9"
            ],
            "targetType": {
              "targetType": "pdbaas_pool",
              "targetTypeName": "Pluggable Database Pool",
              "parentTargetType": "self_service_zone",
              "parentTargetTypeName": "PaaS Infrastructure Zone"
            }
          }
        ],
        "purposeId": 1
      }
    ]
  },
  "payloads": [
    {
      "name": "DBDELETE_PRESCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D511C1CFFE053C075B10AEF2D:0.1"
    },
    {
      "name": "DBDELETE_POSTSCRIPT",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:246A484D51201CFFE053C075B10AEF2D:0.1"
    }
  ],
  "characteristics": [
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_CONTACT",
      "displayName": "Contact",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_COST_CENTER",
      "displayName": "Cost Center",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DEPARTMENT",
      "displayName": "Department",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_DOWNTIME_CONTACT",
      "displayName": "Downtime Contact",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LIFECYCLE_STATUS",
      "displayName": "Lifecycle Status",
      "values": [
        "Development",
        "MissionCritical",
        "Production",
        "Stage",
        "Test"
      ],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LINE_OF_BUS",
      "displayName": "Line of Business",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    },
    {
      "name": "ORACLE.SYSMAN.CFW.ORCL_GTP_LOCATION",
      "displayName": "Location",
      "values": [],
      "required": false,
      "editable": true,
      "visible": true
    }
  ],
  "configurations": [
    {
      "name": "REF_DATA_ZONE",
      "value": "Single Instances Zone"
    },
{
"name":SELECT_TARGET_OPTION"
"value":SELECT_TARGET_FROM_REQUEST"
},
    {
      "name": "TARGET_PROP_LIST",
      "values": [
        "Site:null:false:false",
        "Contact:null:false:false",
        "Downtime Contact:null:false:false",
        "Location:null:false:false",
        "LifeCycle Status:null:false:false",
        "Department:Development:true:true",
        "Comment:This is for testing:false:false",
        "Line of Business:null:false:false"
      ]
    },
    {
      "name": "PDBAAS_CUSTOM_PRE_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7B4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "WORKLOADS",
      "subvalues": [
        {
          "name": "Small",
          "subvalues": [
            {
              "name": "name",
              "value": "SmallPdb"
            },
            {
              "name": "description",
              "value": "small workload"
            },
            {
              "name": "default",
              "value": "N"
            },
            {
              "name": "CPU",
              "value": "2"
            },
            {
              "name": "Memory",
              "value": "2"
            },
            {
              "name": "Storage",
              "value": "5"
            },
            {
              "name": "Sessions",
              "value": "100"
            }
          ]
        }
      ]
    },
    {
      "name": "ROLE_OPTION",
      "value": "CUSTOM_NEW_ROLE"
    },
    {
      "name": "CUSTOM_ROLE_NAME",
      "value": "PDBAAS_NOV_13_2015_16_51_PM"
    },
    {
      "name": "CUSTOM_ROLE_DESC",
      "value": "New db role to be assigned to pluggable database administrator."
    },
    {
      "name": "PRIVILEGES",
      "values": [
        "CREATE SESSION",
        "ALTER SESSION",
        "CREATE DIMENSION",
        "CREATE INDEXTYPE",
        "CREATE ANY OPERATOR",
        "CREATE ANY PROCEDURE",
        "CREATE ANY SEQUENCE",
        "CREATE ANY INDEX",
        "CREATE JOB",
        "CREATE ANY MATERIALIZED VIEW",
        "CREATE ANY TABLE",
        "CREATE ANY TRIGGER",
        "CREATE ANY TYPE",
        "CREATE ANY VIEW",
        "CREATE ANY SYNONYM",
        "CREATE ANY DIRECTORY",
        "SELECT ANY DICTIONARY",
        "SELECT ANY TABLE"
      ]
    },
    {
      "name": "REF_DATA_TARGET_TYPE",
      "value": "rac_database"
    },
    {
      "name": "REF_DATA_ZONE",
      "value": "Clusters Zone - Oracle DB 12c"
    },
    {
      "name": "REF_DATA_HOST",
      "value": "xyz.example.com"
    },
    {
      "name": "REF_DATA_TARGET",
      "value": "cdbfs"
    },
    {
      "name": "REF_DATA_POOL",
      "value": "RAC Pluggable DBs"
    },
    {
      "name": "PDBAAS_CUSTOM_POST_SCRIPTS_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:2469CA4C8C7F4E34E053C075B10A74AD:0.2"
    },
    {
      "name": "SELECT_TARGET_OPTION",
      "value": "SELECT_TARGET_AT_RUNTIME"
    },
    {
      "name": "MAX_TABLESPACE_ALLOWED",
      "value": "1"
    },
    {
      "name": "CREATE_PDB_OPTION",
      "value": "PDB_FROM_PROFILE"
    },
    {
      "name": "PROFILE_URN",
      "value": "oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:246C1E85296C29A1E053C075B10A7DFA:0.1"
    },
    {
      "name": "SHARED_STAGE_LOCATION",
      "value": "/u04/app/hhkaur/product/12.1.0/dbhome_2/rdbms/xml/schema"
    },
    {
      "name": "TABLESPACE_SIZE",
      "values": [
        "0.7715",
        "0.6152",
        "0.0586",
        "0.0049"
      ]
    },
    {
      "name": "INIT_PARAMS",
      "values": [
        "*.cursor_sharing=EXACT",
        "*.open_cursors=300"
      ]
    },
    {
      "name": "PDB_SID_PREFIX",
      "value": "prp"
    }
  ]
}

Note:

In the JSON body mentioned above:
  • To get the software library ID of the "PDBAAS_CUSTOM_PRE_SCRIPTS_URN" and "PDBAAS_CUSTOM_POST_SCRIPTS_URN" run the EM CLI command emcli list_swlib_entities -name="<Pre or Post Standby Database Script>" -show_entity_rev_id. The ID is provided at the end of the output. For example, in the output shown below, oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1 is the ID.

    Pre or Post Standby Database Script,0.1,Pre or Post Standby Database Script,Ready,Directives,,Production,ORACLE,,,oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:01AB6F25F31B7671E0537850B10A9B85:0.1
    
  • To derive the REF_DATA_ZONE to be associated with the Service template, execute a GET request as shown in Section 46.4.1, "Cloud Resource".

  • To derive the ID of the Software Pool that needs to be entered as "poolIds", execute a GET request as shown in Section 48.3.2.3.1, "Viewing Details of the Software Pools Resource".

  • To derive the serviceTemplateTypeId value, perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/admin/cfw/v2/servicetemplates/templatetypes and locate serviceType:DB in the JSON response. Note the serviceTemplateTypeId under serviceType:DB and use the value in the POST body shown above.

  • REF_DATA_ZONE indicates the reference zone among the zones to be associated with the template.

  • REF_DATA_POOL indicates the reference pool among the pools to be associated with the template.

  • REF_DATA_HOST indicates the host of the reference target from the pool targets.

  • REF_DATA_TARGET indicates the reference target from the pool targets.

  • In the table above, the SELECT_TARGET_OPTION parameter defines if the SSA User has the option to select the Container Database (CDB) while requesting for a PDB. If the value for the parameter is set as SELECT_TARGET_FROM_REQUEST, then the SSA User has the option to choose the CDB. If no value is defined, or if the value is set to SELECT_TARGET_AT_RUNTIME, then the placement algorithm selects the CDB.

These parameters are mandatory and are required to identify the reference target to create the database.

47.8.15 Clone DB Based Service Template .json File

{
"type":"CDP",
"configurations":[
 { "name":"PROFILE_COMPONENT_URN", "value":"oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DbProfile:E9F67B964802DD32E040F20A60514EB5:0.1" },
 { "name":"DATABASE_TYPE","value":"oracle_database" },
 { "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
 { "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
 { "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
 { "name":"COMMON_DB_SID","value":"norm" },
 { "name":"COMMON_DOMAIN_NAME","value":"us.example.com" },
 { "name":"LISTENER_PORT", "value":"1521"},
 { "name":"STAGE_LOCATION", "value":"/tmp/rman_backup/backup1383140909156"},         
 { "name":"REF_ZONE", "value":"SLC01HZK_ZONE" },
 { "name":"SID_OPTION", "value":"ssauser  "},
 { "name":"COMMON_DB_SID","value":"mydb1" },
 { "name":"REF_POOL",   "value":"PRIMARY_DB2" },
 { "name":"REF_HOST", "value":"xyxy.example.com" },
 { "name":"REF_TGT","value":"xxxy.example.com" },
 { "name":"ROLE_NAME","value":"ROLE_Oct_31_2014_17_59_PM" },
 { "name":"ROLE_DESC","value":"New database role to be assigned to master account." },
 { "name":"USER_PRIVILEGES","value":"CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY" },
 { "name":"DEFAULT_DATABASE_SIZE","value":"small" },
 { "name":"DATABASE_SIZES","value":"","values":["small","medium"]},
 { "name":"ENTITY_TYPE","value":"USE_PROFILE"},
 { "name":"PROFILE_VERSION","value":"latest"},
 { "name":"TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false",
      "Location:null:false:false",
      "Comment:null:false:false",
      "LifeCycle Status:null:false:false",
     "Line of Business:null:false:false",
     "Contact:null:false:false"]
        },
 { "name":"CUSTOM_TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false
            ]
        },
 { "name":"RMAN:DB_STORAGE_TYPE",  "value":"FS" },
 { "name":"RMAN:FRA_STORAGE_TYPE",  "value":"FS" },  
 { "name":"RMAN:DATA_FILE_LOCATION","value":"/scratch/app/oracle/oradata" },
 { "name":"RMAN:RECOVERY_FILE_LOCATION","value":"/scratch/app/oracle/fra" },
 { "name":"RMAN:REDO_FILE_LOCATION", "value":"/scratch/app/oracle/fra"  },
 { "name":"RMAN:FRA_SIZE", "value":"5000" },        
 { "name":"RMAN:REC_STORAGE_TYPE_SAME_AS_DB_FILES", "value":"Y" },
 { "name":"RMAN:ARCHIVE_LOG_MODE",  "value":"Y" },   
 { "name":"RMAN:FLASH_RECOVERY_AREA_SIZE",  "value":"5000" },         
 { "name":"CLONE_OR_FULL_DB", "value":"CLONE_DB" },
 { "name":"USER_INITIATED_BACKUP_LOCATION", "value":"/tmp" },
 { "name":"ALLOW_BACKUPS", "value":"true" },
 { "name":"MAX_BACKUPS_ALLOWED", "value":"7" },
 { "name":"STAGE_LOCATION", "value":"/tmp" },
 { "name":"RMAN:USE_ARCHIVING", "value":"Y" },      
 {
"name":"INIT_PARAMS",
"subconfigurations":[
 { "name":"INIT_PARAMS:1", "value":"sga_target=314572800" },
 { "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=209715200"  },
 { "name":"INIT_PARAMS:3", "value":"*.control_files='/scratch/app/oracle/oradata/simple/control01.ctl','/scratch/app/oracle/fast_recovery_area/simple/control02.ctl'"  },
{ "name":"INIT_PARAMS:4", "value":"*.db_name='simple'"  }
]
 }
  ]
    }

47.8.16 Full Clone Using an RMAN Duplicate Service Template .json File

{
"type":"CDP",
"configurations":[
{ "name":"DATABASE_TYPE","value":"oracle_database" },
{ "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
{ "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
{ "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
{ "name":"COMMON_DB_SID","value":"norm" },
{ "name":"COMMON_DOMAIN_NAME","value":"us.example.com" },
{ "name":"LISTENER_PORT", "value":"1521"},
{ "name":"STAGE_LOCATION", "value":"/tmp/rman_backup/backup1383140909156"}, 
{ "name":"REF_ZONE", "value":"SLC01HZK_ZONE" },
{ "name":"SID_OPTION", "value":"ssauser" },
{ "name":"COMMON_DB_SID","value":"mydb1" },
{ "name":"REF_POOL",   "value":"PRIMARY_DB2" },
{ "name":"REF_HOST", "value":"xyxy.example.com" },
{ "name":"REF_TGT","value":"xxxy.example.com" },
{ "name":"ROLE_NAME","value":"ROLE_Oct_31_2014_17_59_PM" },
{ "name":"ROLE_DESC","value":"New database role to be assigned to master account." },
{ "name":"USER_PRIVILEGES","value":"CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY" },
{ "name":"DEFAULT_DATABASE_SIZE","value":"small" },
{ "name":"DATABASE_SIZES","value":"","values":["small","medium"]},
{ "name":"LIVE_CLONE_DATABASE_GUID","value":"75D1AA10AE406B671F72A601AA8DC86F"},
{ "name":"ENTITY_TYPE","value":"USE_DATABASE"},
{ "name":"LIVE_CLONE_TYPE","value":"USE_FULLCLONE"}, 
{ "name":"SRC_HOST_CREDS","value":"CREDNAME:OWNER" },
{ "name":"SRC_DB_CREDS","value":"CREDNAME:OWNER" }, 
{ "name":"TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false",
      "Location:null:false:false",
      "Comment:null:false:false",
      "LifeCycle Status:null:false:false",
     "Line of Business:null:false:false",
     "Contact:null:false:false"]
        },
{ "name":"CUSTOM_TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false
            ]
        },
{
"name":"INIT_PARAMS"
"subconfigurations":[
{ "name":"INIT_PARAMS:1", "value":"sga_target=314572800" },
{ "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=209715200"  },
{ "name":"INIT_PARAMS:3", "value":"*.control_files='/scratch/app/oracle/oradata/simple/control01.ctl','/scratch/app/oracle/fast_recovery_area/simple/control02.ctl'"  },
{ "name":"INIT_PARAMS:4", "value":"*.db_name='simple'"  }
]
}
  ]    
    }

47.8.17 Snapclone Database Using Live Clone Template on EMC Storage Service Template .json File

{
"type":"CDP",
"configurations":[
{ "name":"DATABASE_TYPE","value":"oracle_database" },
{ "name":"COMMON_DB_SYSTEM_PASSWORD", "value":"welcome" },
{ "name":"COMMON_DB_DBSNMP_PASSWORD", "value":"welcome" },
{ "name":"COMMON_DB_SYS_PASSWORD","value":"welcome" },
{ "name":"COMMON_DB_SID","value":"norm" },
{ "name":"COMMON_DOMAIN_NAME","value":"us.example.com" },
{ "name":"LISTENER_PORT", "value":"1521"},
{ "name":"STAGE_LOCATION", "value":"/tmp/rman_backup/backup1383140909156"}, 
{ "name":"REF_ZONE", "value":"SLC01HZK_ZONE" },
{ "name":"SID_OPTION", "value":"ssauser" },
{ "name":"COMMON_DB_SID","value":"mydb1" },
{ "name":"REF_POOL",   "value":"PRIMARY_DB2" },
{ "name":"REF_HOST", "value":"xyxy.example.com" },
{ "name":"REF_TGT","value":"xxxy.example.com" },
{ "name":"ROLE_NAME","value":"ROLE_Oct_31_2014_17_59_PM" },
{ "name":"ROLE_DESC","value":"New database role to be assigned to master account." },
{ "name":"USER_PRIVILEGES","value":"CREATE SESSION, ALTER SESSION, CREATE INDEXTYPE, CREATE ANY OPERATOR, CREATE ANY PROCEDURE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE JOB, CREATE ANY MATERIALIZED VIEW, CREATE ANY TABLE, CREATE ANY TRIGGER, CREATE ANY TYPE, CREATE ANY VIEW, CREATE ANY SYNONYM, CREATE ANY DIRECTORY, SELECT ANY DICTIONARY" },
{ "name":"DEFAULT_DATABASE_SIZE","value":"small" },
{ "name":"DATABASE_SIZES","value":"","values":["small","medium"]},
{ "name":"LIVE_CLONE_DATABASE_GUID","value":"75D1AA10AE406B671F72A601AA8DC86F"}
{ "name":"ENTITY_TYPE","value":"USE_DATABASE"},
{ "name":"LIVE_CLONE_TYPE","value":"USE_SNAPCLONE"}, 
{ "name":"SRC_HOST_CREDS","value":"CREDNAME:OWNER" },
{ "name":"SRC_DB_CREDS","value":"CREDNAME:OWNER" },
{ "name":"TARGET_PROP_LIST","value":"",
           "values":[
      "Department:value:false:false",
      "Location:null:false:false",
      "Comment:null:false:false",
      "LifeCycle Status:null:false:false",
     "Line of Business:null:false:false",
     "Contact:null:false:false"]
        },
{ "name":"CUSTOM_TARGET_PROP_LIST","value":"",
         "values":[
      "Department:value:false:false
            ]
        },
{
"name":"INIT_PARAMS",
"subconfigurations":[
{ "name":"INIT_PARAMS:1", "value":"sga_target=314572800" },
{ "name":"INIT_PARAMS:2", "value":"pga_aggregate_target=209715200"  },
{ "name":"INIT_PARAMS:3", "value":"*.control_files='/scratch/app/oracle/oradata/simple/control01.ctl','/scratch/app/oracle/fast_recovery_area/simple/control02.ctl'"  },
{ "name":"INIT_PARAMS:4", "value":"*.db_name='simple'"  }
]
}
  ]    
    }

47.9 Creating a Database Clone Using EM CLI Verbs

This section describes the procedure to create a database clone using EM CLI verbs.

Note:

The procedure to create a Test master database is the same as the procedure to be followed to create a database clone. However, the only difference is in the property file parameters used to create the clone when compared to the property file parameters for Test master database.

Figure 47-5 Creating a Database Clone Using EM CLI Verbs

Surrounding text describes Figure 47-5 .

Follow the steps below to create a database clone or a Test master database:

  1. Create a template properties file from a procedure definition.

    There are two approaches for creating a template properties file. Follow either method 1 or method 2 (given below).

    • Method 1: Using Enterprise Manager UI to create a clone of a database and generate the properties file from it

      To create a template properties file follow the steps below:

      1. Create a database clone via the Enterprise Manger UI.

        Note down the Deployment Procedure Instance Name while creating the clone.

        For example, Deployment Procedure Instance Name = CloneDatabase_SYSMAN_12_24_2014_15_58_PM.

      2. Use the instance name in the following command to generate a template properties file.

        emcli get_instance_data 
        [-instance={instance_guid}] 
        [-exec={execution_guid}] 
        [-name={execution name}] 
        [-owner={execution owner}]
        
        Sample:
        emcli get_instance_data -name='CloneDatabase_SYSMAN_12_24_2014_15_58_PM' -owner='SYSMAN' > /tmp/create_clone.props
        
    • Method 2: Generating the properties file using EM CLI verbs

      To create a template properties file using EM CLI verbs, follow the steps below:

      1. Retrieve the GUID or the name of the procedure. Run the following command to retrieve these.

        emcli get_procedures
        [-type={procedure type}]
        
        Sample command:
        emcli get_procedures -type=DBConfig
        
        Sample output:
        GUID                         Type      Name                        DisplayName             Version  Owner   Parent Procedure
        0A15E9DC20772EF5E053E87BF00A6701  DBConfig  db_clone_eb_procedure       db_clone_eb_procedure   2.12     ORACLE
        0A15E9DC20A12EF5E053E87BF00A6701  DBConfig  db_config_procedure         DB Snap Clone           2.2      ORACLE
        0A15E9DC20422EF5E053E87BF00A6701  DBConfig  config_db_create_procedure  Create Oracle Database  1.5      ORACLE
        
      2. Input the GUID or the name as an input value in the following command to generate a template properties file.

        emcli describe_procedure_input
        [-procedure={procedure GUID}]
        [-name={procedure name or procedure configuration}]
        [-owner={owner of the procedure or procedure configuration}]
        [-parent_proc={procedure of the procedure configuration. This only applies to describe a procedure configuration with the same name}]
        
        Sample command:
        emcli describe_procedure_input -procedure=0A15E9DC20A12EF5E053E87BF00A6701 > /tmp/create_clone.props
        
  2. Enter new values in the properties file.

    Use an editor to edit the properties file. Enter the desired values for the variables and save the properties file.

    The table below shows the properties file parameters used to create a database clone. To see the properties file parameters for creating a Test master database, see Table 47-19, "Sample Properties File for Creating a Test Master Database".

    Table 47-18 Sample Properties File for Creating a Database Clone

    Parameters Sample values Description

    Mandatory Parameters

    CLONE_TYPE

    CLONE_TYPE=DUPLICATE

    Type of clone. Valid values are DUPLICATE, SNAP, DNFS_PROFILE and RMAN_PROFILE.

    SRC_DB_TARGET_NAME

    SRC_DB_TARGET_NAME=xxyy.us.example.com

    Source database target name.

    SRC_DB_TARGET_TYPE

    SRC_DB_TARGET_TYPE=oracle_database

    Source database target type. Valid values are oracle_database and rac_database.

    SRC_DB_CRED

    SRC_DB_CRED=NC_CRED:SYSCO

    Source database credentials in the format: <NAME:OWNER>.

    SRC_HOST_NORMAL_NAMED_CRED

    SRC_HOST_NORMAL_NAMED_CRED=NC_HOST_CRED:SYSCO

    Source host credentials in the format: <NAME:OWNER>.

    COMMON_GLOBAL_DB_NAME

    COMMON_GLOBAL_DB_NAME=clonedb.example.com

    Global database name of the clone database.

    COMMON_DB_SID

    COMMON_DB_SID=clonedb

    SID of the clone database.

    DB_TARGET_NAME

    DB_TARGET_NAME=clonedb.xxy.example.com

    Clone database target name.

    DATABASE_TYPE

    DATABASE_TYPE=dbTypeSI

    Indicates the type of database. Accepted values are - dbTypeSI and dbTypeRAC.

    TARGET_HOST_LIST

    TARGET_HOST_LIST=desthost.example.com

    Destination host name where the clone database will be created.

    ORACLE_HOME_NAME

    ORACLE_HOME_NAME=OraDB12Home2_29

    Name of destination Oracle home.

    ORACLE_HOME_LOC

    ORACLE_HOME_LOC=/scratch/app/product/11.2.0./dbhome_1

    Location of destination Oracle home.

    ORACLE_BASE_LOC

    ORACLE_BASE_LOC=/scratch/app

    Location of destination Oracle base.

    HOST_NORMAL_NAMED_CRED

    HOST_NORMAL_NAMED_CRED=NC_HOST_CRED:SYSCO

    Destination host credentials in the format: <NAME:OWNER>.

    DB_STORAGE_TYPE

    DB_STORAGE_TYPE=FS

    Database files storage type. Valid values are FS and ASM.

    DB_FILE_LOC

    DB_FILE_LOC=/scratch/app/oradata

    Location where database files will be created for the clone database..

    FRA_STORAGE_TYPE

    FRA_STORAGE_TYPE=FS

    Fast Recovery Area storage type. Valid values are FS and ASM.

    FLASH_REC_AREA

    FLASH_REC_AREA=/scratch/user/app/fra

    Location where recovery related files (archived redo logs, RMAN backups, and other related files) are created.

    FRA_SIZE

    FRA_SIZE=4395

    Fast Recovery Area size.

    ARCHIVE_LOG_MODE

    ARCHIVE_LOG_MODE=NO

    Whether the clone database should be in ARCHIVELOG mode. Accepted values are YES and NO.

    DEST_LISTENER_SELECTION

    DEST_LISTENER_SELECTION=DEST_DB_HOME

    Indicates whether the listener specified is a Grid Home listener. Valid values are GRID_INFRA and DEST_DB_HOME.

    LISTENER_PORT

    LISTENER_PORT=1526

    Port of the listener with which the clone database is to be registered.

    ENABLE_LIVE_CLONE

    ENABLE_LIVE_CLONE=true

    Indicates if live clone is to be enabled. Accepted vaules are true and false.

    DB_ADMIN_PASSWORD_SAME

    DB_ADMIN_PASSWORD_SAME=true

    Indicates if the passwords for SYSTEM, SYS and DBSNMP users are same or different. Accepted values are true or false.

    DATABASE_PASSWORDS

    DATABASE_PASSWORDS=right1

    Common password of SYSTEM, SYS and DBSNMP users. This is applicable only when the parameter DB_ADMIN_PASSWORD_SAME=true.

    DB_TEMPLATE_STAGE

    DB_TEMPLATE_STAGE=/tmp

    Temporary staging area used to store files transferred from source host.

    Optional Parameters

    CLUSTERNAME

    CLUSTERNAME=cluster

    Name of the destination cluster. This is applicable only if DATABASE_TYPE= dbTypeRAC.

    RAC_CONFIG_TYPE

    RAC_CONFIG_TYPE=ADMIN_MANAGED

    Destination cluster database type. This is applicable only if DATABASE_TYPE= dbTypeRAC. Valid value is ADMIN_MANAGED.

    RAC_NODE_LIST

    RAC_NODE_LIST=node1,node2

    List of RAC nodes where the clone database will be created. This is applicable only if DATABASE_TYPE= dbTypeRAC.

    IS_RAC_ONE

    IS_RAC_ONE=false

    Indicates if it's a RAC One node. This is applicable only if DATABASE_TYPE= dbTypeRAC

    SRC_HOST_NORMAL_PREF_CRED_SET_NAME

    SRC_HOST_NORMAL_PREF_CRED_SET_NAME=HostCredsNormal

    Source database preferred credentials.

    ASMSYSPWD

    ASMSYSPWD=String1

    Source ASM password. This is applicable only if the source database is on ASM.

    HOST_NORMAL_PREF_CRED_SET_NAME

    HOST_NORMAL_PREF_CRED_SET_NAME= HostCredsNormal

    Destination host preferred credentials.

    HOST_PRIV_NAMED_CRED

    HOST_PRIV_NAMED_CRED= HOST_PRIV_CRED:SYSCO

    Destination host root credentials. This is applicable only if CLONE_TYPE=SNAP.

    HOST_PRIV_PREF_CRED_SET_NAME

    HOST_PRIV_PREF_CRED_SET_NAME=HostCredsPriv

    Destination host preferred root credentials. This is applicable only if CLONE_TYPE=SNAP.

    PROFILE_INTERNAL_PATH

     

    Profile internal path of the backup. This is applicable only if a profile is used for clone.

    PROFILE_VERSION_URN

     

    Profile version URN of the backup. This is applicable only if a profile is used for clone.

    BACKUP_LOCATION_NAME

    BACKUP_LOCATION_NAME=/scratch/databkp

    Database backups' location. This is applicable if it's not a live clone.

    BACKUP_TAG

     

    Datafiles tag of the RMAN legacy backup. This is applicable only if using non-profile based RMAN backups for clone.

    CONTROL_FILE_TAG

     

    Control files tag of the RMAN legacy backup. This is applicable only if using non-profile based RMAN backups for clone.

    PIT_DATETIME

     

    Point in time recovery using date and time. This is applicable if it's not a live clone.

    PIT_SCN

     

    Point in time recovery using SCN. This is applicable if it's not a live clone.

    IS_SAVE_PROFILE

     

    Indicates that a snapshot profile of the source database will be created. This is applicable only if CLONE_TYPE=SNAP.

    COMMON_DOMAIN_NAME

    COMMON_DOMAIN_NAME=xxy.example.com

    Domain of clone database.

    COMMON_DB_DBSNMP_PASSWORD

    COMMON_DB_DBSNMP_PASSWORD=right

    DBSNMP user password for the clone database. This is applicable only when the parameter DB_ADMIN_PASSWORD_SAME=false.

    COMMON_DB_SYSTEM_PASSWORD

    COMMON_DB_SYSTEM_PASSWORD=right

    SYSTEM user password for the clone database. This is applicable only when the parameter DB_ADMIN_PASSWORD_SAME=false.

    COMMON_DB_SYS_PASSWORD

    COMMON_DB_SYS_PASSWORD=right

    SYS user password for the clone database. This is applicable only when the parameter DB_ADMIN_PASSWORD_SAME=false.

    MOUNT_POINT_PREFIX

    MOUNT_POINT_PREFIX=/vol1/prefix

    Mount point prefix. This parameter is applicable only if CLONE_TYPE=SNAP.

    MOUNT_POINT_LIST

    MOUNT_POINT_LIST=volname1

    Storage Volume name. This parameter is applicable only if CLONE_TYPE=SNAP.

    MOUNT_ADDL_SIZE_LIST

    MOUNT_ADDL_SIZE_LIST=2

    Writable space. This parameter is applicable only if CLONE_TYPE=SNAP.

    USE_OFA

    USE_OFA=false

    Indicates if Oracle Flexible Architecture should be used for customizations of the database storage files locations. Valid values are true and false.

    OFA_TEMP_FILE_LOCATION

    OFA_TEMP_FILE_LOCATION=/scratch/user/app/oradata/temp

    Location where temporary files are to be created. This parameter is applicable only if USE_OFA=true.

    OFA_REDO_LOG_LOCATION

    OFA_REDO_LOG_LOCATION==/scratch/user/app/oradata/rlog

    Location where Redo log files are to be created. This parameter is applicable only if USE_OFA=true.

    OFA_CONTROL_FILE_LOCATION

    OFA_CONTROL_FILE_LOCATION==/scratch/user/app/control

    Location where the control files are to be created. This parameter is applicable only if USE_OFA=true.

    IS_SAVE_TARGET_PROFILE

    IS_SAVE_TARGET_PROFILE=Y

    Indicates if a profile of the clone database should be created. Valid values are Y and N.

    NEW_PROFILE_LOCATION

    NEW_PROFILE_LOCATION=Database Provisioning Profiles/12.1.0.1.0/Linuxx86_64

    Location of the profile in software library. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y.

    NEW_PROFILE_NAME

    NEW_PROFILE_NAME=Clone Profile

    Name of the new DB Profile to be created. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y

    PROFILE_DESC

    PROFILE_DESC=Database Reference Profile 24-12-2014 04:00 PM from orcl.xyc.example.com Version : 12.1.0.1.0

    Description of the profile. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y.

    PROFILE_NOTES

    PROFILE_NOTES=Host Name: xyz.example.com Database: orcl.xyz.example.com

    Notes for the profile. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y.

    PROFILE_VENDOR

    PROFILE_VENDOR=Oracle

    Vendor of the profile. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y

    PROFILE_VERSION

    PROFILE_VERSION=12.1.0.1.0

    Version of the profile. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y

    DATA_CONTENT_MODE

    DATA_CONTENT_MODE=RMAN

    Data mode for the database profile. The accepted values are: RMAN, and DNFS. This parameter is applicable only if IS_SAVE_TARGET_PROFILE=Y.

    RMAN_BACKUP_LOCATION

    RMAN_BACKUP_LOCATION=/scratch/user/app/backup

    Location where RMAN backup files will be created. This is applicable only if IS_SAVE_TARGET_PROFILE =Y and DATA_CONTENT_MODE is RMAN or DNFS.

    BACKUP_FILE_TAG

    BACKUP_FILE_TAG=data_backup_1419417051961

    Tag to be associated with backup files. This parameter is mandatory if IS_SAVE_TARGET_PROFILE is set to Y and DATA_CONTENT_MODE is RMAN.

    BACKUP_TYPE

    BACKUP_TYPE=OFFLINE

    Type of backup. It can be OFFLINE or ONLINE. The default is Offline. This parameter is applicable only if IS_SAVE_TARGET_PROFILE =Y.

    PROFILE_PURGE_POLICY_TYPE

    PROFILE_PURGE_POLICY_TYPE=SNAPSHOTS,

    Profile purge policy type. Accepted values are SNAPSHOTS or DAYS. This parameter is applicable only if IS_SAVE_TARGET_PROFILE =Y.

    PROFILE_PURGE_POLICY_VALUE

    PROFILE_PURGE_POLICY_VALUE=1

    Profile purge policy value. This parameter is applicable only if IS_SAVE_TARGET_PROFILE =Y

    PROFILE_SCHEDULE

     

    Schedule for profile creation.

    IS_TESTMASTER_DATABASE

    IS_TESTMASTER_DATABASE=N

    Indicates your choice of creating the clone database as the Test master database. Accepted values are Y or N.

    ENABLE_DATA_MASK

    ENABLE_DATA_MASK=true

    Indicates if data mask needs to be applied. Accepted values are true and false.

    MASKING_DEFINITION_NAME

    MASKING_DEFINITION_NAME=MASK_DEF_10

    Name of the masking definition. This parameter is applicable only if ENABLE_DATA_MASK= true.

    CUSTOM_PRE_SCRIPTS_URN

     

    URN of the pre-cloning script in software library.

    CUSTOM_POST_SCRIPTS_URN

     

    URN of the post-cloning script in software library.

    POST_SQL_SCRIPT_URN

     

    URN of the post-cloning SQL script in software library.

    RUN_AS_USER

    RUN_AS_USER =sys

    Name of the user to run post-cloning SQL script. This parameter is applicable only if POST_SQL_SCRIPT_URN is specified.

    RUN_AS_USER_PWD

    RUN_AS_USER_PWD =right

    Password of the user to run post-cloning SQL script. This parameter is applicable only if POST_SQL_SCRIPT_URN is specified.

    EXECUTION_MODE

    EXECUTION_MODE = PROVISIONING

    Mode of execution.

    CONFIGURE_WITH_ORACLE_RESTART

    CONFIGURE_WITH_ORACLE_RESTART=N

    Indicates if the clone database should be configured with Oracle restart.


    Table 47-19 Sample Properties File for Creating a Test Master Database

    Parameters Sample values Description

    Mandatory Parameters

    CLONE_TYPE

    CLONE_TYPE=DUPLICATE

    Type of clone. The default value is DUPLICATE.

    COMMON_DB_DBSNMP_PASSWORD

    COMMON_DB_DBSNMP_PASSWORD=come

    Password to be set for DBSNMP user in the clone database.

    COMMON_DB_SID

    COMMON_DB_SID=clonedb

    SID of the clone database.

    COMMON_DB_SYSTEM_PASSWORD

    COMMON_DB_SYSTEM_PASSWORD=sysco

    Password to be set for SYSTEM user in the clone database.

    COMMON_DB_SYS_PASSWORD

    COMMON_DB_SYS_PASSWORD=sysco

    Password to be set for SYS user in the clone database.

    DATABASE_PASSWORDS

    DATABASE_PASSWORDS=Sysco1

    Password of clone database.

    COMMON_GLOBAL_DB_NAME

    COMMON_GLOBAL_DB_NAME=clonedb.xyz.com

    Global clone database name.

    DB_ADMIN_PASSWORD_SAME

    DB_ADMIN_PASSWORD_SAME=true

    Whether the passwords for SYSTEM, SYS and DBSNMP users are same or different. Accepted values are true or false.

    DEST_LISTENER_SELECTION

    DEST_LISTENER_SELECTION=DEST_DB_HOME

    Oracle home location of the destination.

    HOST_NORMAL_NAMED_CRED

    HOST_NORMAL_NAMED_CRED=HOST:SYSCO

    Credentials of the host.

    IS_TESTMASTER_DATABASE

    IS_TESTMASTER_DATABASE=Y

    Indicates if you want create the clone database as Test master database. Accepted values are Y or N. The default value is N.

    USAGE_MODE

    USAGE_MODE = testMaster

    Mode of use of the clone database.

    CLOUD_TARGET

    CLOUD_TARGET = true

    Indicates if the cloud target is allowed.

    LISTENER_PORT

    LISTENER_PORT=1526

    Port of the listener with which the clone database is to be registered.

    ORACLE_BASE_LOC

    ORACLE_BASE_LOC=/scratch/app

    Location of Oracle base.

    ORACLE_HOME_LOC

    ORACLE_HOME_LOC=/scratch/app/product/11.2.0./dbhome_1

    Location of Oracle home.

    EM_USER

    EM_USER=sys

    EM user name.

    EM_PWD

    EM_PWD=Sys1

    EM password.

    SRC_DB_CRED

    SRC_DB_CRED=DB:SYSCO

    Credentials of the source database.

    SRC_DB_TARGET_NAME

    SRC_DB_TARGET_NAME=orcl.xyz.com

    Source database target name.

    SRC_HOST_NORMAL_NAMED_CRED

    SRC_HOST_NORMAL_NAMED_CRED=HOST:SYSCO

    Credentials of the host database.

    TARGET_HOST_LIST

    TARGET_HOST_LIST=blr22.xyz.com

    List of target hosts.

    Optional Parameters

    ARCHIVE_LOG_MODE

    ARCHIVE_LOG_MODE=NO

    Indicates if the clone database should be in archive log mode. The default value is NO.

    BACKUP_FILE_TAG

    BACKUP_FILE_TAG=data_backup_1419417051961

    Tag to be associated with backup files. This parameter is mandatory if IS_SAVE_TARGET_PROFILE is set to Y and DATA_CONTENT_MODE is RMAN.

    BACKUP_TYPE

    BACKUP_TYPE=OFFLINE

    Type of backup. Accepted values are OFFLINE or ONLINE. The default value is OFFLINE.

    COMMON_DOMAIN_NAME

    COMMON_DOMAIN_NAME=xxy.example.com

    Domain of the clone database.

    CONFIGURE_WITH_ORACLE_RESTART

    CONFIGURE_WITH_ORACLE_RESTART=N

    Indicates if you want to configure clone database with oracle restart. The default value is N.

    DATABASE_TYPE

    DATABASE_TYPE=dbTypeSI

    Accepted values are - Single Instance Database, RAC Database and RAC One Node Database. The default value is Single Instance Database.

    DATA_CONTENT_MODE

    DATA_CONTENT_MODE=RMAN

    Data mode for which the database profile needs to be submitted. It can have the following values: EXPORT, DBCA_TEMPLATE, RMAN, DNFS, and STORAGE_SNAPSHOT.

    DB_FILE_LOC

    DB_FILE_LOC=/scratch/app/oradata

    Location where data files, tmp files, redo log files, and control files are created.

    DB_STORAGE_TYPE

    DB_STORAGE_TYPE=FS

    Database storage type. Accepted values are File System (FS) and ASM. The default value is FS.

    DB_TARGET_NAME

    DB_TARGET_NAME=clonedb.xxy.example.com

    Clone database target name.

    DB_TEMPLATE_STAGE

    DB_TEMPLATE_STAGE=/scratch/view_storage/emagent/gcagent/em_staging

    Staging area used to store files transferred from source host.

    ENABLE_LIVE_CLONE

    ENABLE_LIVE_CLONE=true

    Indicates if live clone is to be enabled. The default value is true.

    IS_SAVE_TARGET_PROFILE

    IS_SAVE_TARGET_PROFILE=Y

    Indicates if you want to create a DB profile using the clone database. Accepted values are Y or N. The default value is N.

    NEW_PROFILE_LOCATION

    NEW_PROFILE_LOCATION=Database Provisioning Profiles/12.1.0.1.0/Linuxx86_64

    Location of the profile in software library. This parameter is mandatory if IS_SAVE_TARGET_PROFILE is set to Y.

    NEW_PROFILE_NAME

    NEW_PROFILE_NAME=Clone Profile

    Name of the new DB profile to be created. It is mandatory if IS_SAVE_TARGET_PROFILE is set to Y.

    ORACLE_HOME_NAME

    ORACLE_HOME_NAME=OraDB12Home2_29_idc.example.com

    Name of Oracle home.

    PDB_ADMIN_PASSWORD

     

    Pluggable database admin password.

    PROFILE_DESC

    PROFILE_DESC=Database Reference Profile 24-12-2014 04:00 PM from orcl.xyc.example.com Version : 12.1.0.1.0

    Description of the profile.

    PROFILE_NOTES

    PROFILE_NOTES=Host Name: xyz.example.com Database: orcl.xyz.example.comData Content: Structure and Data

    Notes for the profile.

    PROFILE_VENDOR

    PROFILE_VENDOR=Oracle

    Vendor of the profile. The default is Oracle.

    PROFILE_VERSION

    PROFILE_VERSION=12.1.0.1.0

    Version of the profile. If no value is specified, the database version is used.

    RMAN_BACKUP_LOCATION

    RMAN_BACKUP_LOCATION=/scratch/app/backup

    Location where RMAN backup files is to be created. This parameter is mandatory if IS_SAVE_TARGET_PROFILE is set to Y and DATA_CONTENT_MODE is RMAN or DNFS.

    SRC_DB_TARGET_TYPE

    SRC_DB_TARGET_TYPE=oracle_database

    Type of source database.

    MASKING_DEFINITION_NAME

    MASKING_DEFINITION_NAME=MASK_DEF_10

    Name of the masking definition to be applied after cloning the database.

    ENABLE_DATA_MASK

    ENABLE_DATA_MASK=true

    Indicates if data mask is to be enabled. The default value is false.

    PROFILE_PURGE_POLICY_TYPE

    PROFILE_PURGE_POLICY_TYPE=SNAPSHOTS,

    Profile purge policy type. Accepted values are SNAPSHOTS or DAYS. The default value is NONE.

    PROFILE_PURGE_POLICY_VALUE

    PROFILE_PURGE_POLICY_VALUE=1

    Profile purge policy value.

    PROFILE_SCHEDULE

     

    Schedule for profile execution.

    WORKING_DIRECTORY

    WORKING_DIRECTORY=/tmp

    The location where the files are staged.

    FLASH_REC_AREA

     

    Location where recovery related files (archived redo logs, RMAN backups, and other related files) are created. The storage type of Fast Recovery Area will be same as that of database files location.

    FRA_STORAGE_TYPE

     

    Is the same as Database storage type.


  3. Execute the following EM CLI verb to create a database clone (or Test master), using the updated properties file as the input file.

    emcli create_clone
          -input_file="File containing properties required for cloning a database"
    
    Sample:
    emcli create_clone  -inputFile=/tmp/create_clone.props
    
    Sample output:
    Submitting clone database procedure... 0AF491A8D9FE29F2E0539878B10A6333 Deployment procedure submitted successfully
    
  4. Verify the status of the database clone creation by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml]
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -instance=0AF491A8D9FE29F2E0539878B10A6333
    
    Sample output:
    0AF491A8DA0529F2E0539878B10A6333, DBConfig, db_config_procedure 1419435633924, COMPLETED
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -instance=0AF491A8D9FE29F2E0539878B10A6333 -xml -details -showJobOutput
    

47.10 Refreshing a Database Using EM CLI Verbs

This section describes the procedure to refresh a database using EM CLI verbs.

Figure 47-6 Refreshing a Database Using EM CLI Verbs

Surrounding text describes Figure 47-6 .

Follow the steps below to refresh a database:

  1. Refresh the database by executing the emcli refresh_database command mentioned below.

    The EM CLI command requires a properties file as an input. The properties file details are mentioned in the table below.

    Table 47-20 Sample Properties File for Refreshing a Database

    Parameters Sample values Description

    Mandatory Parameters

    DB_TEMPLATE_STAGE

    DB_TEMPLATE_STAGE=/tmp

    Staging area used to store files transferred from source host.

    COMMON_DB_SYSTEM_PASSWORD

    COMMON_DB_SYSTEM_PASSWORD=come

    Password to be set for SYSTEM user.

    COMMON_DB_DBSNMP_PASSWORD

    COMMON_DB_DBSNMP_PASSWORD=come

    Password to be set for DBSNMP user.

    COMMON_DB_SYS_PASSWORD

    COMMON_DB_SYS_PASSWORD=come

    Password to be set for SYS user.

    ASMSYSPWD

    ASMSYSPWD=come

    ASM SYS password to login to ASM. This parameter is only applicable if database files are on ASM. Otherwise, it is not required.

    CLONE_TYPE

    CLONE_TYPE=RMAN_PROFILE

    Type of clone.

    Optional Parameters

    TARGET_TYPE

    TARGET_TYPE=rac_database

    Type of target. Accepted values are oracle_database or rac_database.

    ORACLE_HOME

    ORACLE_HOME_LOC=/u01/user/app/user/product/11.2.0/dbhome_1

    Location of Oracle home.

    SRC_SYS_PWD

    SRC_SYS_PWD=Come

    Source SYS password.

    SRC_SID

    SRC_SID=orcl

    Source database SID.

    TARGET_NAME

     

    Name of the target.


    emcli refresh_database
                         -target_name="database target name"
                         -target_type="database target type"
                         -input_file=data:"file:path"
    Sample:
    emcli refresh_database -target_name="database" -target_type="oracle_database" -input_file=data:"/tmp/refr.txt"
    
    Output:
    Refresh Database deployment procedure has been submitted successfully with the instance
    name:"RefreshDatabase_SYSMAN_06_23_2014_01_00_PM" and execution_guid='0AE6096550756B26E0539878B10A6FF5'
    

    To know the status of the procedure in xml format, execute the following command.

    emcli get_instance_status -exec=0AE6096550756B26E0539878B10A6FF5 -xml -details -showJobOutput
    
  2. Verify the status of the database refresh by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml]
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -exe=0AFDFE7D36525B18E0539878B10A39FB
    
    Sample output:
    00AFDFE7D36555B18E0539878B10A39FB, DBPROV, RefreshDatabase_SYSMAN_06_23_2014_01_00_PM, COMPLETED
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -exe=0AF491A8D9FE29F2E0539878B10A6333 -xml -details -showJobOutput
    

47.11 Deleting a Database Using EM CLI Verbs

This section describes the procedure to delete a database using EM CLI verbs.

Figure 47-7 Deleting a Database Using EM CLI Verbs

Surrounding text describes Figure 47-7 .

Follow the steps below to delete a database:

  1. Delete the database with the emcli delete_database command mentioned below.

    The EM CLI command requires a properties file as an input. The properties file details are mentioned in the table below.

    Table 47-21 Sample Properties File for Deleting a Database

    Parameters Sample values Description

    Mandatory Parameters

    HOST_CREDS

    HOST_CREDS=sys:come,

    Credentials of the host in <Credentials name>:<Credentials owner> format.

    DB_TARGET_GUID

    DB_TARGET_GUID=083B2D3F9B911BD3E0539878B10A3096

    GUID of the target database.

    Select the Target_GUID from mgmt$target, where target_name='MyDB.example.com' and target_type='rac_database'

    DATABASE_TYPE

    DATABASE_TYPE=dbTypeSI,

    Type of database.

    Permissible values are either dbTypeSI or dbTypeRAC.

    DB_ORACLE_HOME_LOC

    DB_ORACLE_HOME_LOC=/u01/oracle/product/dbhome,

    Location of Oracle home.

    DB_TARGET_NAME

    DB_TARGET_NAME=m2.xyz.com,

    Name of the target database.

    DB_SID

    DB_SID=clem

    Database SID.

    In case of a RAC database provide the same value as provided for DB_TARGET_NAME.

    HOST_NAME

    HOST_NAME=abc.example.com,

    Name of the host in case of a SI database.

    Incase of a RAC database enter the Cluster database target host name. To retrieve it, use the EM repository query (select host_name from mgmt$target where target_name='MyDB.example.com' and target_type='rac_database').

    ORACLE_BASE

    ORACLE_BASE=/u01/app/oracle

    Oracle base location.

    DBNAME

    DBNAME=clem

    Database name in case of SI database.

    In case of a RAC database enter the Cluster database target 'DBName' Target property. To retrieve this property use the EM repository query (select property_value from mgmt$target_properties where target_name='MyDB.example.com' and target_type='rac_database' and property_name='DBName')

    Optional Parameter

    ROOT_CREDS

    ROOT_CREDS=ABDCGA45268SDF

    Privileged credentials GUID. This parameter is required if the target database is snapshot based and mounted on a volume.


    emcli delete_database
    -inputFile="File containing properties required for deleting a clone"
    
    Sample:
    emcli delete_database -inputFile=/u01/files/delete_clone.props
    
    Output:
    Submitting delete database procedure...
    0AFDFE7D36525B18E0539878B10A39FB
    Deployment procedure submitted successfully
    
  2. Verify the status of the database deletion by executing the following EM CLI verb.

    emcli get_instance_status
    [-instance={instance guid}]
    [-exe=execution guid]
    [-xml
    [-details]
    [-showJobOutput]
    [-tailLength={last N characters}]]
    
    Sample:
    emcli get_instance_status -instance=0AFDFE7D36525B18E0539878B10A39FB
    
    Output:
    0AFDFE7D36555B18E0539878B10A39FB, DBPROV, DB_CLEANUP_PROC 1419457116034, COMPLETED
    

    To know the complete status of each of the steps in xml format, execute the following command.

    emcli get_instance_status -instance=0AF491A8D9FE29F2E0539878B10A6333 -xml -details -showJobOutput
    

47.12 Database Fleet Maintenance EM CLI Verbs

The following table provides details of the verbs supported for Database fleet maintenance.

Note:

The EM CLI verb options mentioned in square brackets - [] are optional.

Table 47-22 Database Software Maintenance EM CLI Verbs

Verb Description Format

emcli db_software_maintenance -createSoftwareImage

Creates a new software image provided in the oracle home. The createSoftwareImage verb takes either data (a .txt file) or getInputVariableList from the command line.

  • input_file- Path of the input file.

  • getInputVariableList - Provides the list of variables to be specified in the input file.

Examples:

  • To get the list of all the parameters to be passed inside the data file, run the following command:

    emcli db_software_maintenance -createSoftwareImage -getInputVariableList=true

  • To create a new image and a version, use the following example:

    emcli createSoftwareImage -input_file="data:"/home/user/input_rac"

    Where the contents of the input_rac file are:

    • IMAGE_NAME=DbGoldImage

    • IMAGE_DESCRIPTION=Gold Image for 11g db

    • REF_TARGET_NAME=ORACLE_HOME

    • IMAGE_SWLIB_LOC=Oracle Home Provisioning

    • Profiles/11.2.0.3.0/linux_x64

    • REF_HOST_CREDENTIALS=ZONE_CREDS:TESTSUPERADMIN

    • WORKING_DIRECTORY=/tmp

    • STORAGE_TYPE_FOR_SWLIB=OmsShared

    • STORAGE_NAME_FOR_SWLIB=swlib

    • VERSION_NAME=Version1

  • To only create a new version into an existing image, see the following example:

    emcli db_software_maintenance -createSoftwareImage -input_file="data:"/home/user/input_rac"

    Where the contents of the input_rac file are:

    • IMAGE_ID=01B5F14FD57D7B89E05313B2F00A739F

    • REF_TARGET_NAME=ORACLE_HOME

    • IMAGE_SWLIB_LOC=Oracle Home Provisioning

    • Profiles/11.2.0.3.0/linux_x64

    • REF_HOST_CREDENTIALS=ZONE_CREDS:TESTSUPERADMIN

    • WORKING_DIRECTORY=/tmp

    • STORAGE_TYPE_FOR_SWLIB=OmsShared

    • STORAGE_NAME_FOR_SWLIB=swlib

    • VERSION_NAME=Version1

  • emcli db_software_maintenance

    -createSoftwareImage

    -getInputVariableList=true

  • emcli createSoftwareImage

    -input_file="data:"/home/user/input_rac"

emcli db_software_maintenance -createVersion

Creates a new version in an existing image using an existing software library component.

  • version_name - Name of the version.

  • image_id - Name of the image.

  • external_id - External ID of the version. For example, the URN of the software library gold image.

  • status - Status of the version. For example, DRAFT, ACTIVE, CURRENT, or RESTRICTED.

Example:

emcli db_software_maintenance -createVersion -version_name="Version1" -image_id="01B5F14FD57D7B89E05313B2F00A739F" -external_id="oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_OracleDB:0191172464DD36B6E05313B2F00AB90A:0.1" -status=CURRENT

emclu db_software_maintenance

-createVersion-version_name="Versionx"

-image_id="xxxx"

-external_id="yyyy"

-status="CURRENT"

emcli db_software_maintenance -subscribeTarget

Creates a new or modifies the existing target subscription.

  • target_name - Name of the target.

  • target_type - Target type.

  • [parent_target_name] - Parent target name.

  • [parent_target_type] - Parent target type.

  • image_id - Name of the image.

Example:

emcli db_software_maintenance -subscribeTarget -target_name="POOL NAME" -target_type=oracle_cloud_zone -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

emcli db_software_maintenance

-subscribeTarget -target_name="xxx"

-target_type="yyy"

-image_id=zzz

emcli db_software_maintenance -updateVersionStatus

Updates version of the image.

  • version_id - Id of the version.

  • status - Status of the version. For example, DRAFT, ACTIVE, CURRENT, or RESTRICTED.

Example:

emcli db_software_maintenance -updateVersionStatus -version_id=02A635AOD8D904A4E05362F3E40ADFD8 -status=CURRENT

emcli db_software_maintenance

-updateVersionStatus

-version_id="xxx"

-status="CURRENT"

emcli db_software_maintenance -getImageSubscriptions

Returns the list of subscribed targets.

  • image_id- Name of the image.

Example:

emcli db_software_maintenance -getImageSubscriptions -image_id="01B5F14FD57D7B89E05313B2F00A739F"

emcli db_software_maintenance

-getImageSubscriptions

-image_id="xxx"

emcli db_software_maintenance -deleteImage

Deletes an image.

  • image_id - Name of the image to be deleted.

  • [force] - Deletes forcibly even if the image has subscribed targets.

Example:

emcli db_software_maintenance -deleteImage -image_id="01B5F14FD57D7B89E05313B2F00A739F"

emcli db_software_maintenance

-deleteImage

-image_id="xxxx"

emcli db_software_maintenance -unsubscribeTarget

Unsubscribes the target.

  • target_name - Name of the target.

  • target_type - Target type.

  • image_id - Name of the image.

Example:

emcli db_software_maintenance -unsubscribeTarget -target_name="POOL NAME" -target_type=oracle_cloud_zone -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

emcli db_software_maintenance

-unsubscribeTarget

-target_name="xxx"

-target_type=yyyy

-image_id=zzz

emcli db_software_maintenance -searchImage

Searches the image based on the provided filters. Use '%' for wildcard.

  • [name_pattern] - Indicates the name pattern.

  • [version_pattern] - Indicates the version pattern.

  • [description_pattern] - Indicates the version pattern.

  • [owner] - Indicates the owner name.

  • [target_type] - Indicates the target type.

  • [platform_id] - Indicates the platform ID. For example, 226 for Linux x86_64.

Examples:

  • emcli db_software_maintenance -searchImage -name_pattern="%GI%"

  • emcli db_software_maintenance -searchImage -platform_id="226"

emcli db_software_maintenence

-searchImage

-platform_id="xxx"

-[name_pattern= ”name_pattern”]

-[version_pattern= ”version_pattern”]

-[description_pattern= ”description_pattern”]

-[owner= ”owner”]

-[target_type= ”target_type”]

-[platform_id= ”platform_id”]

emcli db_software_maintenance -getTargetSubscriptions

Returns the list of subscriptions for the given target.

  • target_name - Name of the target.

  • target_type - Target type.

  • image_type - Type of the image.

Example:

emcli db_software_maintenance -getTargetSubscriptions -target_name="POOL NAME" -target_type="oracle_cloud_zone"

emcli db_software_maintenance

-getTargetSubscriptions

-target_name="xxxx"

-target_type="yyyy"

-image_type="zzzz"

emcli db_software_maintenance -getVersions

Returns the list of the versions for the given image.

  • image_id - Name of the image.

  • [version_status] - Status filter for the version.

Example:

emcli db_software_maintenance -getVersions image_id="01B5F14FD57D7B89E05313B2F00A739F" -version_status=CURRENT

emcli db_software_maintenance

-getVersions

-image_id="xxxx"

-version_status=CURRENT

emcli db_software_maintenance -getImages

Returns the list of image present in the system.

Example:

emcli db_software_maintenance -getImages

emcli db_software_maintenence - getImages

emcli db_software_maintenance -getSubscriptionsForContainer

Return the subscriptions for the container target such as the database pool.

  • image_id - Name of the image.

  • target_name - Name of the target.

  • target_type - Target type in EM.

Example:

emcli db_software_maintenance -getSubscriptionsForContainer -target_name="POOL NAME" -target_type=oracle_cloud_zone -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

emcli db_software_maintenance

-getSubscriptionsForContainer

-target_name="xxxx"

-target_type="yyyy"

-image_id="zzzz"

emcli db_software_maintenance -activateSoftware

Activates a new software of the pool.

  • pool_name - Name of the pool.

  • pool_type - Type of the pool.

  • [force] - Forcibly activates the new members.

Example:

emcli db_cloud_maintenance -activateSoftware -pool_name=POOL -pool_type=oracle_cloud_zone -force=true

emcli db_cloud_maintenance

-activateSoftware

-pool_name=xxxx

-pool_type="yyy"

-force="true"

emcli db_software_maintenance -performOperation

Creates a new cloud maintenance operation.

  • name= ”name” - Name of the operation.

  • description= ”description” - Description of the operation.

  • purpose= ”purpose” - Purpose of the maintenance window.

    The possible values are: UPDATE_DB, UPDATE_RACDB, UPDATE_GI, DEPLOY_DB_SOFTWARE, DEPLOY_GI_SOFTWARE, DEPLOY_RAC_SOFTWARE, ROLLBACK_DB, ROLLBACK_GI, ROLLBACK_RACDB, and CLEANUP_SOFTWARE.

  • [start_schedule= ”start_schedule”] - Start Schedule. The input for start_schedule is of the format- yyyy-MM-dd HH:mm:ss. For example, start_schedule="2013-11-11 12:15:30". The default start time is - immediate.

  • pool_name= ”pool_name” - Name of the pool.

  • pool_type= ”pool_type” - Type of the pool.

  • [input_file= ”data:input_file”] - Input data for the maintenance action. For example, input_file="data:~/input_files/data.

  • [target_type= ”target_type”] - Target type. The default target type is identified based on the purpose. For example, if purpose is DEPLOY_DB, the default target type is oracle_home.

  • [target_list= ”target_list”] - Comma separated target list.

    The target list is the list of entities based on the target type that is selected. For example, target_type=rac_database target_list="rac1.example.com,rac2.example.com". The default target_list is based on the purpose. For example if the purpose is DEPLOY_DB, the default target list is the list of oracle homes present in the pool.

Example:

emcli db_cloud_maintenance -performOperation -name="Update RAC Database " -description="Update RAC database Instance" -purpose="UPDATE_RACDB" -start_schedule="start_time:2014/09/01 00:00" -pool_name="POOL NAME" -pool_type=oracle_cloud_zone -target_type=rac_database -target_list="rac1.example.com"

emcli db_cloud_maintenance

-performOperation

-name="update"

-description="Update RAC database Instance"

-purpose="UPDATE_RACDB"

-start_schedule="start_time:2014/09/01 00:00"

-pool_name="xxx"

-pool_type="yyy"

-target_type=rac_database

-target_list="rac1.example.com"


47.13 Database Request Handling EM CLI Verbs

The table below lists the supported verbs for database request handling.

Table 47-23 Force Cleanup EM CLI Verbs

Verb Description Format

cleanup_dbaas_requests

Cleans up a failed request from the host and EM.

Cleans up all failed requests from a pool. Optionally, it cleans up failed requests for a specific user.

The options -ids and -pool_name cannot be used together.

  • ids - The request ID to be used for filtering cloud requests separated by semicolon(;).

  • pool_name - The name of the pool from which requests have to be cleaned up.

  • pool_type - The type of pool. The possible values are:

    • For Database pools: database

    • For Schema pools: schema

    • For Pluggable database pools: pluggable_database

  • user - User Name to be used for filtering requests for delete.

  • all - Cleans up all requests - both successful and failed, cancels the requests that are in scheduled state, and leaves the "in progress" requests as is. If this option is not specified, cleanup will be performed on failed requests only.

Note:

The clean-up operation explained here can also be performed using a REST API. For details, see Section 51.7.2.4, "Clearing a Collection of Service Requests".

Example:

emcli cleanup_dbaas_requests -ids="10"
emcli cleanup_dbaas_requests -ids="10;11;12"
emcli cleanup_dbaas_requests -pool_name="database_pool" -pool_type="database"
emcli cleanup_dbaas_requests -pool_name="database_pool" -pool_type="database" –all
emcli cleanup_dbaas_requests -pool_name="database_pool" -pool_type="database" -all -user="SSA_USER"

Sample Output:

Service Template "My Schema Service Template" created successfully

emcli cleanup_dbaas_requests

[-ids="<request id>"]

[-pool_name="<pool name>" ]

[-pool_type="<database|schema|pluggable _database>"]

[-user="<SSA User name>"]

[-all]


47.14 Cloning a Pluggable Database

The EM CLI verb emcli pdb_clone_management creates a new clone of an existing pluggable database.

The details of the verb are as follows:

Table 47-24 Pluggable Database Cloning EM CLI Verb

Verb Description Format

emcli pdb_clone_management

Creates a new clone of an existing pluggable database.

  • -input_file - Location of the file containing properties required for cloning the pluggable database. See Table 47-25 for details.

  • [-cloneToOracleCloud] - Indicates that the destination container database (CDB) is on Oracle Cloud.

Example:

emcli pdb_clone_management -input_file=data:/u01/files/pdb_clone.props

emcli pdb_clone_management

-input_file

[-cloneToOracleCloud]


The table below explains the required parameters and values in the properties file that needs to be used as an input file for cloning a pluggable database. You can either have a full clone of the pluggable database or a snapshot clone. For details of full clone and snapshot clones see, Section 47.14.1, "Pluggable Database Full Clone Methods", and Section 47.14.2, "Pluggable Database Snapshot Clone Types".

Table 47-25 Sample Properties File for Cloning a Pluggable Database

Parameters Sample values Description

Mandatory Parameters

SRC_PDB_TARGET

SRC_PDB_TARGET=cdb_prod_PDB

Enterprise Manager (EM) target name of the source pluggable database (PDB).

SRC_HOST_CREDS

SRC_HOST_CREDS=NC_HOST_SHYSYSCO

Named credentials for the source target host.

SRC_CDB_CREDS

SRC_CDB_CREDS=NC_DB_SYS:SYSCO

Named credentials for the source CDB.

SRC_WORK_DIR

SRC_WORK_DIR=/tmp/source

Work directory at the source host where files are temporarily stored. If this parameter is not provided, the agent work directory is used.

DEST_HOST_CREDS

DEST_HOST_CREDS=NC_SLEO_SSH:SYSCO

Named credentials for the destination target host. If destination host is on Oracle Cloud, then the value for this parameter should be the host SSH credentials.

DEST_LOCATION

DEST_LOCATION=/scratch/app/cdb_tm/HR_TM_PDB6

Data file location in the destination where the new PDB should be hosted.

DEST_CDB_TARGET

DEST_CDB_TARGET=cdb_tm

EM target name of CDB where the new PDB should be cloned.

DEST_CDB_TYPE

DEST_CDB_TYPE=oracle_database

EM target type of the destination CDB.

DEST_CDB_CREDS

DEST_CDB_CREDS=NC_DB_SYS:SYSCO

Named credentials for the destination CDB.

DEST_PDB_NAME

DEST_PDB_NAME=HR_TM_PDB6

Name of the new PDB.

Optional Parameters

SRC_CDB_TARGET

SRC_CDB_TARGET=cdb_prodt_DB

EM target name of the CDB containing the source PDB.

SRC_CDB_TYPE

 

EM target type of the CDB containing the source PDB.

IS_SNAPSHOT_COPY

IS_SNAPSHOT_COPY=true

Indicates that the clone is a snapshot clone.

SRC_HOST

SRC_HOST=xyz.example.com

EM target name of the host containing the source CDB. If this value is not provided, it will be derived from the CDB.

DEST_HOST

DEST_HOST=xyz.example.com

EM target name of host containing the destination CDB. If this value is not provided, it will be derived from the CDB.

EXISTING_BACKUP

EXISTING_BACKUP=/user1/pdbbackup/app/PROD_PDB_Backup_14297779

Indicates the absolute location of the existing backup in the file system, and if it should be used to clone the new PDB.

EXISTING_BACKUP_METADATA

EXISTING_BACKUP_METADATA=/user1/pdbbackup

Absolute location of the metadata template of the backup. This parameter is required, if EXISTING_BACKUP is provided.

BACKUP_TYPE

BACKUP_TYPE=OSIMAGE

Indicates the backup type. The accepted values are TAR, OSIMAGE, and RMAN.

If an existing backup (EXISTING_BACKUP parameter) is provided, this parameter represents the type of the backup. If not, this parameter represents the type of backup that should be taken during job execution. If both, EXISTING_BACKUP and BACKUP_TYPE are not provided, the source PDB, will be unplugged, and copied over to the destination for creating a new clone. Once the datafiles are copied, the source PDB will be plugged back.


47.14.1 Pluggable Database Full Clone Methods

The different methods of full cloning that are possible with a pluggable database are mentioned below. The process of achieving them are by configuring certain parameters in the properties file, while using the emcli pdb_clone_management verb.

  • Operating System (OS) Image backup (supported only for Oracle Cloud)

    Takes a backup of the source PDB and creates a new PDB. The BACKUP_TYPE parameter should specify the type of backup. The EXISTING_BACKUP and EXISTING_BACKUP_METADATA parameters should not be provided.

  • Existing backup (supported for on-premise PDBs and Oracle Cloud PDBs)

    Uses an existing backup of the source PDB and creates a new PDB. The BACKUP_TYPE parameter should specify the type of backup. The EXISTING_BACKUP parameter should specify the location with the backup name and EXISTING_BACKUP_METADATA should specify the location and the metadata file name for the backup.

    Note:

    If the destination PDB and the source PDB are in different CDBs wherein, both the CDBs are on-premise (or on Oracle Cloud), then ensure that the source PDB is in read-write mode. This is necessary since a database link is created in the destination CDB for cloning the PDB, and a temporary user is created in the source PDB for using the database link. If there is an existing database link in the destination CDB that connects to the source PDB, then use the parameter EXISTING_DB_LINK_NAME to provide the database link name in the properties file.
  • Unplug/plug (supported only for Oracle Cloud)

    Unplugs the source PDB and creates a new PDB at the destination using the unplugged source, and then plugs the source back. Both, EXISTING_BACKUP and BACKUP_TYPE parameters should not be provided.

47.14.2 Pluggable Database Snapshot Clone Types

The different methods of snapshot cloning that are possible with a pluggable database on-premise are mentioned below. The process of achieving them are by configuring certain parameters in the properties file, while using the emcli pdb_clone_management verb.

Note:

For all the snapshot clone types, in addition to the mandatory parameters in Table 47-25, add the parameter IS_SNAPSHOT_COPY=true, to the properties file.
  • Exadata sparse clone snapshot

    The Exadata sparse clone snapshot will work only if the destination PDB data file location is in sparse ASM disk group in an Exadata machine, and the source and destination PDB data files share the same ASM instance.

    Set the value of the DEST_LOCATION to create an Exadata sparse clone. The DEST_LOCATION should be the name of the ASM sparse disk group. For example, +SPARCEDG.

  • ACFS (ASM cluster file system) snapshot

    The ACFS snapshot will work only if the source and destination PDB data file location is in common ACFS file system.

  • CLONEDB initialization parameter set to FALSE

    When you create a snapshot clone of a source PDB and the CLONEDB initialization parameter of the destination host is set to FALSE, the underlying file system for the source PDB's files must support storage snapshots. Such file systems include Oracle Automatic Storage Management Cluster File System (Oracle ACFS) and Direct NFS Client storage.

  • CLONEDB initialization parameter set to TRUE

    When you create a clone of a source PDB and the CLONEDB initialization parameter of the destination host is set to TRUE, the underlying file system for the source PDB's files can be any local file system, network file system (NFS), or clustered file system that has Direct NFS enabled. However, the source PDB must remain in open read-only mode as long as any clones exist.

47.15 Creating a Test Master Pluggable Database

The EM CLI verb emcli pdb_clone_management creates a new clone of an existing pluggable database. The same verb is used to create a Test Master of a pluggable database. However, the properties file used for the verb is different. For details of the verb see Table 47-24. For details of the properties file used to create the Test Master see Table 47-26.

Table 47-26 Sample Properties File for Creating a Pluggable Database Test Master

Parameters Sample values Description

Mandatory Parameters to Create a Test Master

SRC_PDB_TARGET

SRC_PDB_TARGET=cdb_prod_PDB

Enterprise Manager (EM) target name of the source pluggable database (PDB).

SRC_HOST_CREDS

SRC_HOST_CREDS=NC_HOST_SAY:SYSCO

Named credentials for the source target host.

SRC_CDB_CREDS

SRC_CDB_CREDS=NC_DB_SYS:SYSCO

Named credentials for the source CDB.

SRC_WORK_DIR

SRC_WORK_DIR=/tmp/source

Work directory at the source host where files are temporarily stored. If this parameter is not provided, the agent work directory is used.

DEST_HOST_CREDS

DEST_HOST_CREDS=NC_SLO_SSH:SYSCO

Named credentials for the destination target host. If destination host is on Oracle Cloud, then the value for this parameter should be the host SSH credentials.

DEST_LOCATION

DEST_LOCATION=/scratch/app/cdb_tm/HR_TM_PDB6

Data file location in the destination where the new PDB should be hosted.

DEST_CDB_TARGET

DEST_CDB_TARGET=cdb_tm

EM target name of CDB where the new PDB should be cloned.

DEST_CDB_TYPE

DEST_CDB_TYPE=oracle_database

EM target type of the destination CDB.

DEST_CDB_CREDS

DEST_CDB_CREDS=NC_DB_SYS:SYSCO

Named credentials for the destination CDB.

DEST_PDB_NAME

DEST_PDB_NAME=HR_TM_PDB6

Name of the new PDB.

IS_CREATE_AS_TESTMASTER

IS_CREATE_AS_TESTMASTER=true

Flag to set the cloned PDB as a Test Master PDB in the EM.

Mandatory Parameters (along with the above) to Create a Test Master on Exadata ASM

ACL_DF_GROUP

ACL_DF_GROUP=oinstall

Group name to provide the permission to the Exadata ASM disk group data files of the cloned PDB.

ACL_DF_OWNER

ACL_DF_OWNER=oracle

Owner name to provide the required permission to the Exadata ASM disk group data files of the cloned PDB.

Optional Parameters

MASKING_DEFINITION_NAME

MASKING_DEFINITION_NAME=CRM_Masking_Defn

Name of the masking definition in EM that will be applied on the cloned PDB.

CUSTOM_PRE_SCRIPTS_URN

CUSTOM_PRE_SCRIPTS_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:14288BACD7BB765FE0533B79B10AA480:0.3

Software library URN of the script to be run before creating the clone PDB in the destination host.

CUSTOM_POST_SCRIPTS_URN

CUSTOM_POST_SCRIPTS_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Directives:none:14288BACD7C1765FE0533B79B10AA480:0.3

Software library URN of the script to be run after creating the clone PDB in the destination host.

POST_SQL_SCRIPT_URN

POST_SQL_SCRIPT_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_Generic:142899134B2C25E8E0533B79B10A2D54:0.1

Software library URN of the SQL script to be run in the destination CDB after creating the clone PDB.

RUN_AS_USER

RUN_AS_USER=sys

User name to run the post SQL script.

RUN_AS_USER_PWD

RUN_AS_USER_PWD=gosad

Password to run the post SQL script.

ACL_DF_GROUP_PERM

ACL_DF_GROUP_PERM=read only

Level of permission to be given to the group for the Exadata ASM disk group data files of the cloned PDB.

ACL_DF_OWNER_PERM

ACL_DF_OWNER_PERM=read only

Level of permission to be given to the owner for the Exadata ASM disk group data files of the cloned PDB.

ACL_DF_OTHER_PERM

ACL_DF_OTHER_PERM=read only

Level of permission to be given to others for the Exadata ASM disk group data files of the cloned PDB.

SRC_CDB_TARGET

SRC_CDB_TARGET=cdb_prodt_DB

EM target name of the CDB containing the source PDB.

SRC_CDB_TYPE

 

EM target type of the CDB containing the source PDB.

SRC_HOST

SRC_HOST=xyz.example.com

EM target name of the host containing the source CDB. If this value is not provided, it will be derived from the CDB.

DEST_HOST

DEST_HOST=xyz.example.com

EM target name of host containing the destination CDB. If this value is not provided, it will be derived from the CDB.

EXISTING_BACKUP

EXISTING_BACKUP=/user1/pdbbackup/app/PROD_PDB_Backup_14297779

Indicates the absolute location of the existing backup in the file system, and if it should be used to clone the new PDB.

EXISTING_BACKUP_METADATA

EXISTING_BACKUP_METADATA=/user1/pdbbackup

Absolute location of the metadata template of the backup. This parameter is required, if EXISTING_BACKUP is provided.

BACKUP_TYPE

BACKUP_TYPE=OSIMAGE

Indicates the backup type. The accepted values are TAR, OSIMAGE, and RMAN.

If an existing backup (EXISTING_BACKUP parameter) is provided, this parameter represents the type of the backup. If not, this parameter represents the type of backup that should be taken during job execution. If both, EXISTING_BACKUP and BACKUP_TYPE are not provided, the source PDB, will be unplugged, and copied over to the destination for creating a new clone. Once the datafiles are copied, the source PDB will be plugged back.


47.16 Transferring Data Between Databases

The details of the EM CLI verb used to transfer data are as follows:

Table 47-27 Data Transfer EM CLI Verb

Verb Description Format

emcli data_transfer

Transfers data from the source database to the target database.

  • -input_file - Location of the file containing the properties required for transferring data. See Table 47-28 for details.

Example:

emcli data_transfer -input_file=data:/u01/files/data_transfer.props

emcli data_transfer

-input_file


The table below explains the required parameters and values in the properties file that needs to be used as an input file for transferring data.

Table 47-28 Sample Properties File for Transferring Data

Parameters Sample values Description

Mandatory Parameters

SOURCE_LOCATION

SOURCE_LOCATION=/tmp/newp/PDB_Backup_1428003803938

Location of the data at the source host.

SRC_HOST

SRC_HOST=bl.example.com

The source host containing the data.

SRC_HOST_CREDS

SRC_HOST_CREDS=NC_HOST_SHY:SYS

Credentials for the host on which the data is located. If the source host is on Oracle Cloud, the value should be host SSH credentials.

DEST_HOST

DEST_HOST=slc0.example.com

The destination host where the data should be copied to.

DEST_HOST_CREDS

DEST_HOST_CREDS=NC_SLO_SSH

Credentials for the host where the data should be copied to. If the destination host is on Oracle Cloud, the value should be host SSH credentials.

DEST_LOCATION

DEST_LOCATION=/scratch/app3/oradata/migda

Location on the destination host where the data should be copied to.


47.17 Backing Up Datafiles and Metadata of a Pluggable Database

The details of the EM CLI verb used to backup datafiles and metadata of a pluggable database are as follows:

Table 47-29 EM CLI Verb for Datafile and Metadata Backup of Pluggable Databases

Verb Description Format

emcli pdb_backup

Takes a backup of datafiles and metadata xml of the specified pluggable database.

  • -input_file - Location of the file containing the properties required for taking a backup of the PDB. See Table 47-30 for details.

Example:

emcli pdb_backup -input_file=data:/u01/files/pdb_backup.props

emcli pdb_backup

-input_file


The table below explains the required parameters and values in the properties file that needs to be used as an input file for backup of datafiles and metadata of a pluggable database.

Table 47-30 Sample Properties File for Datafile and Metadata Backup of a Pluggable Database

Parameters Sample values Description

Mandatory Parameters

TARGET_HOST_LIST

TARGET_HOST_LIST=xyz.abccorp.com

Host on which the target Container database (CDB)/Pluggable database (PDB) is hosted.

HOST_NORMAL_NAMED_CRED

HOST_NORMAL_NAMED_CRED=XYZ_CRED:CRED_OWNER

Host credentials.

SRC_CDB_NAMED_CRED

SRC_CDB_NAMED_CRED=CDB1_CRED:CRED_OWNER

SYSDBA credentials of the source CDB.

SRC_CDB_TARGET_NAME

SRC_CDB_TARGET_NAME=CDB1

The target name of the CDB which hosts the PDB.

SRC_CDB_TARGET_TYPE

SRC_CDB_TARGET_TYPE=oracle_database

CDB target type.

SRC_PDB_TARGET_NAME

SRC_PDB_TARGET_NAME=CDB1_PDB1

The target name of the PDB whose backup is required.

BACKUP_LOCATION

BACKUP_LOCATION=/scratch/pdbBackup

Path of the file system where the backup should be copied to.

WORK_DIR_LOCATION

WORK_DIR_LOCATION=/tmp

Temporary staging location on the source host.

ORACLE_HOME_LOC

ORACLE_HOME_LOC=/scratch/d121hmcasm/product/12.1.0/dbhome_1

Oracle home of the CDB.


47.18 Importing Data from Export Dumps to a Database

The details of the EM CLI verb used to import data from export dumps to a database are as follows:

Table 47-31 EM CLI Verb for Importing Data from Export Dumps to a Database

Verb Description Format

emcli dbimport

Imports data from export dumps to the specified database target.

  • -input_file - Location of the file containing the properties required for importing data from export dumps. See Table 47-32 for details.

Example:

emcli dbimport -inputFile=data:/u01/files/dbimport.props

emcli dbimport

-input_file


The table below explains the required parameters and values in the properties file that needs to be used as an input file for importing data from export dumps to a database.

Table 47-32 Sample Properties File for Importing Data from Export Dumps to a Database

Parameters Sample values Description

Mandatory Parameters

DESTINATION_TARGET

DESTINATION_TARGET=SS_OPC_DB

Destination PDB target (or DB target) where the schema should be imported.

DESTINATION_TARGET_TYPE

DESTINATION_TARGET_TYPE=oracle_database

The destination target type.

DATABASE_CREDENTIAL

DATABASE_CREDENTIAL=SYSDBA:SYS

SYSDBA credentials of the target.

HOST_NAMED_CREDENTIAL

HOST_NAMED_CREDENTIAL=AE_NC:SYS

Credentials of the host where the destination target is hosted.

PROFILE_LOCATION

PROFILE_LOCATION=Database Provisioning Profiles/12.1.0.1.0/linux_x64/Export Dump of Sample schemas10

Location of the profile which is created during export.

REMAP_SCHEMA_LIST.(x)

REMAP_SCHEMA_LIST.0=HR:HR

REMAP_SCHEMA_LIST.1=OE:OE

REMAP_SCHEMA_LIST.2=PM:PM

REMAP_SCHEMA_LIST.3=IX:IX

REMAP_SCHEMA_LIST.4=SH:SH

REMAP_SCHEMA_LIST.5=BI:BI

List of schemas that needs to be imported.

REMAP_TABLESPACE_LIST.(x)

REMAP_TABLESPACE_LIST.0=EXAMPLE:MYTBSP1

REMAP_TABLESPACE_LIST.1=USERS:MYTBSP1

REMAP_TABLESPACE_LIST.2=SYSTEM:MYTBSP1

Schema corresponding tablespaces for the schema import.

DEGREE_OF_PARALLELISM

DEGREE_OF_PARALLELISM=1

Indicates if the data needs to imported in parallel.

DUMP_FILE_LIST.(x)

DUMP_FILE_LIST.0=/scratch/aime/dumpdir/samplschemas.dmp

Location of the dump file in the destination host.

IMPORT_LOG_FILE_DIRECTORY

IMPORT_LOG_FILE_DIRECTORY=DATA_PUMP_DIR

Location where the log files should be stored. This is a directory object inside the database.

FORWARDER_HOST

FORWARDER_HOST=slo.us.example.com

Indicates the forwarder host.

FORWARDER_CRED

FORWARDER_CRED=AIME_NC:SYSMAN

Indicates the forwarder host credentials.

WORKING_DIRECTORY

WORKING_DIRECTORY=/tmp

Temporary staging location on the source host.


47.19 Invoking a REST API Using EM CLI Verb

emcli invoke_ws is an EM CLI verb used to invoke a REST API to perform the action expected by the REST API. The medium however is Enterprise Manager command line interface.

Table 47-33 Invoking a REST API Using an EM CLI Verb

Verb Description Format

emcli invoke_ws

Invokes the Enterprise Manager Web service to act as per the REST API passed via this verb.

Options:

  • -wsname - Indicates the URI of the resource.

  • -method - Specifies of the REST method.

  • -payload - Indicates the json/xml input payload.

  • -accept - Payload type. These are standard REST API values.

  • -type - Standard REST API response types.

  • -param - This option is used to pass a form/query parameter value. For example, -param="name:value". More than one parameter can be specified. For example, -param="name:value" -param="zip:12345".

    The parameter can be provided through a file. For example, the parameters can be specified in a text file with name file.txt and the command can have the options as: -param="name:tag" -input_file="tag:file.txt", wherein the parameter name will derive the value from the input file file.txt.

  • -input_file - Use this option to pass in payload or param value from file.

Examples:

  • emcli invoke_ws -wsname=/em/websvcs/restful/emws/core/v0/list/dataservice -method=get -param="name:Administrators"

    Invokes list resource and sources all administrators

  • emcli invoke_ws -wsname=/em/websvcs/restful/emws/core/v0/list/dataservice -method=get -param="name:tag" -input_file="tag:file.txt"

    Invokes list resource and sources all administrators. The name parameter is read from file.txt.

emcli invoke_ws

-wsname=<WebService Name>

-method=<method name>

[-payload=<Payload>]

[-accept=<accept type>

[-type=response type]

[-param=Query Parameters]

[-input_file=<Input File for payload data>]


A sample of the contents of the file.txt is shown below.

Name:Administrators
Zip:23456