db_software_maintenance

Image and Subscriptions

createImage

Description

Creates a new image.

Format

emcli db_software_maintenance -createImage
  -image_name= "image_name"
  -description= "description"
  -type= "type"
  -target_type= "target_type"
  -version= "version" 
  -platform_id= "platform_id"
  -status= "status"

Options

  • image_name

    The name of the image.

  • description

    The description of the image.

  • type

    The type of the image, for example SWLIB if the image version will be in the Software Library.

  • target_type

    The target type of the image. For example, if the image is being created to manage single instance Oracle Database then the target type is 'oracle_database.

  • version

    The RDBMS version of the product, for example 11.2.0.4.0.

  • platform_id

    The platform id, for example 226 for Linux x86_64.

  • status

    The image status, for example PRODUCTION.

Examples

The following example creates a new image with the name GI_11204.

emcli db_software_maintenance -createImage
  -image_name="GI_11204" 
  -description="GI_11204" 
  -type="SWLIB" 
  -target_type=cluster -version=11.2.0.4.0 
  -platform_id=226 -status=PRODUCTION 

getImages

Description

Returns the list of images which are created in the cloud flow. The gold image that is created as a part of profile creation will not be listed here. Images which failed or are inactive won't appear on the list.

Format

emcli db_software_maintenance -getImages
[-all]

Examples

The following example returns a list of images present in production.

emcli db_software_maintenance -getImages

To get a list of all created images, use the -all parameter:

emcli db_software_maintenance -getImages -all

deleteImage

Description

Deletes an image.

Format

emcli db_software_maintenance -deleteImage            
  -image_id= "image_id"
  [-force= "force"]

[ ]  indicates that the parameter is optional.
  • image_id

    The ID of the image to be deleted.

  • force

    Deletes forcibly even if the image has subscribed targets.

Examples

The following example deletes the image with the ID 01B5F14FD57D7B89E05313B2F00A739F.

emcli db_software_maintenance -deleteImage 
  -image_id="01B5F14FD57D7B89E05313B2F00A739F

subscribeTarget

Description

Creates new target or modifies the target subscription.

Format

emcli db_software_maintenance -subscribeTarget      
  -target_name= "target_name"
  -target_type= "target_type"
  -[parent_target_name= "parent_target_name"]
  -[parent_target_type= "parent_target_type"]
  -image_id= "image_id"
  -[version_id= "version_id'

[ ]  indicates that the parameter is optional.

Options

  • target_name

    The name of the target.

  • target_type

    The target type.

  • parent_target_name

    The parent target name.

  • parent_target_type

    The parent target type.

  • image_id

    The image id.

  • version_id

    The version id.

Examples

The following example modifies the Oracle Cloud Zone target POOL NAME.

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

getTargetSubscriptions

Description

Returns a list of subscriptions for the specified target.

Format

emcli db_software_maintenance -getTargetSubscriptions
  -target_name= "target_name"
  -target_type= "target_type"
  [-image_type= "image_type"] 

[ ]  indicates that the parameter is optional.
  • target_name

    The name of the target.

  • target_type

    The target type.

  • image_type

    The image type.

Examples

The following example returns a list of subscriptions for the Oracle Cloud Zone target with the name POOL NAME.

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

unsubscribeTarget

Description

Unsubscribes the specified target.

Format

emcli db_software_maintenance -subscribeTarget      
  -target_name= "target_name" 
  -target_type= "target_type"
  -image_id= "image_id" 
  [-version_id= "version_id']

[ ]  indicates that the parameter is optional.
  • target_name

    The name of the target.

  • target_type

    The target type.

  • image_id

    The image id.

  • version_id

    The version id.

Examples

The following example unsubscribes the Oracle Cloud Zone target with the name POOL NAME and the image ID FE55AD7AB28974EFE04313B2F00AD4A0.

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

createSoftwareImage

Description

Creates a new software image for the specified the Oracle home. The createSoftwareImage verb either takes data from a text file or uses the getInputVariableList command.

Format

emcli db_software_maintenance -createSoftwareImage
[-input_file="data:<file_location>"]
[-getInputVariableList= "getInputVariableList"]
[-workDir= "Work Directory Location"]

[ ]  indicates that the parameter is optional.

Options

  • input_file

    The path of the txt input file in the format: data:input_file_path

  • getInputVariableList

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

  • workDir

    Specify the working directory to be used. This is an optional parameter.

Examples

Example 1

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

emcli db_software_maintenance -createSoftwareImage
  -getInputVariableList=true

Example 2

Create a new text file called input_rac.txt and paste the following:
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

Run the following example to create a new image and a version.

emcli db_software_maintenance -createSoftwareImage 
  -input_file="data:/input_rac.txt"

searchImage

Description

Searches the image based on the filters provided. Use '%' for wildcards. If there is no filter specified, it returns all the images present in the system.

Format

emcli db_software_maintenance -searchImage
  [-name_pattern= "name_pattern"]
  [-version_pattern= "version_pattern"]
  [-description_pattern= "description_pattern"]
  [-owner= "owner"]
  [-target_type= "target_type"]
  [-platform_id= "platform_id"]

[ ]  indicates that the parameter is optional.
  • name_pattern

    The name pattern.

  • version_pattern

    The version pattern.

  • description_pattern

    The description pattern.

  • version_pattern

    The version pattern.

  • target_type

    The target type.

  • platform_id

    The platform id, for example 226 for Linux x86_64.

Examples

Example 1

The following example searches the database image for names that contain GI.

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

Example 2

The following example searches the database image for platform id 226.

emcli db_software_maintenance -searchImage
  -platform_id="226"

createVersion

Description

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

Format

emcli db_software_maintenance -updateVersionStatus
  -version_name= "version_name"       
  -image_id= "image_id"       
  -external_id= "external_id"          
  -status= "status"  

Options

  • version_name

    The name of the version.

  • image_id

    The ID of the image.

  • external_id

    The external ID of the version. For example, it will be the Uniform Resource Name (URN) of the Software Library gold image.

  • status

    The status of the version, for example DRAFT, ACTIVE, CURRENT, RESTRICTED.

Examples

The following example creates a version Version1.

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

updateVersionStatus

Description

Updates the version status of the image.

Format

emcli db_software_maintenance -updateVersionStatus
  [-version_id= "version_id"]
  -status= "status"

[ ]  indicates that the parameter is optional.

Options

  • version_id

    The version id.

  • status

    The status of the version, for example DRAFT, ACTIVE, CURRENT, RESTRICTED.

Examples

The following example updates the version of the image with the version ID 02A635AOD8D904A4E05362F3E40ADFD8 to CURRENT.

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

getVersions

Description

Returns a list of the versions for the specified image.

Format

emcli db_software_maintenance -getVersions
  -image_id= "image_id"
  [-version_status= "version_status"]

[ ]  indicates that the parameter is optional.
  • image_id

    The name of the image.

  • version_status

    The status filter for the version.

Examples

The following example returns a list of versions for the image with the ID 01B5F14FD57D7B89E05313B2F00A739F.

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

getImageSubscriptions

Description

Returns the list of subscribed targets.

Format

emcli db_software_maintenance -getImageSubscriptions
  -image_id= "image_id" 
  • image_id

    The ID of the image.

Examples

The following example returns a list of targets for the image with the ID ID01B5F14FD57D7B89E05313B2F00A739F.

emcli db_software_maintenance -getImageSubscriptions
  -image_id="01B5F14FD57D7B89E05313B2F00A739F"

getSubscriptionsForContainer

Description

Returns the subscriptions for the container target, for example database pool.

Format

emcli db_software_maintenance -getSubscriptionsForContainer      
  -image_id= "image_id"   
  -target_name= "target_name"  
  -target_type= "target_type" 
  • image_id

    The image id.

  • target_name

    The name of the target in Oracle Enterprise Manager.

  • target_type

    The target type.

Examples

The following example returns the subscriptions for the Oracle Cloud Zone target with the name POOL NAME and the image ID FE55AD7AB28974EFE04313B2F00AD4A0.

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

Fleet Management Software

performOperation -Deploy

Description

The deploy command automatically uses the current version of the subscribed image while creating the new Oracle Home.

Format

emcli db_software_maintenance -performOperation
  -name=""
  -purpose=""
  [-description=""]
  [-reportOnly="<true|false>"]
  [-workDir=""]
  [-start_schedule=""]
  [-inputfile="data:<file_location>"]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-sql_sec="<sql_sec>"]
  [-rolling="true|false"]
  [-node_list=""]
  [-startupDBAAfterSwitch="<true|false>"]
  [-skipSwitchDatabase="<true|false>"]
  [-startupDatabase="<true|false>"]
  [-ignoreStandbyPrereq="<true|false>"]
  [-standbyAutoDeploy="<true|false>"]
  [-blackoutguid="<true|false>"]

[ ]  indicates that the parameter is optional.
  • name

    This is the unique name of the operation.

  • purpose

    There are standard purposes that can be performed by fleet operations which can be:
    • DEPLOY_DB_SOFTWARE

    • DEPLOY_RAC_SOFTWARE

    • DEPLOY_SIHA_SOFTWARE

    • DEPLOY_GI_SOFTWARE

    • DEPLOY_CBD_SOFTWARE

  • description

    Description of the operation.

  • reportOnly

    This is used in case of CLEANUP_SOFTWARE where the user wishes to clean Oracle Homes that are candidates for deletion, but does not want to perform the actual cleanup operation.

  • workDir

    Work directory location.

  • target_type

    The type of target on which this operation is being performed.

  • target_list

    This is a comma separated list of targets that need to be patched.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

  • privilege_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • start_schedule

    The date on which the stage and deploy is to be started if it is to be started in the future.

    Format: "start_time:yyyy/mm/dd HH:mm"

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
  • Input_file

    This file contains the following entries:

    • NEW_ORACLE_HOME_LIST= <path of new Oracle home>

      This is the location where the new Oracle Home will be installed on all the hosts. The Credential Owner must have read / write access to this location.

    • workingDir=<Name of temp directory>

    • dispatchLoc=<Dispatch location>

      This is the location where all scripts will be staged on the host. These scripts will be executed as a “root” user.

    • SKIP_PREREQUISITE_CHECKS=<true|false>- The default value is false.

    • SKIP_CVU_CHECK=<true|false>- The default value is false.

    • PREREQS_ONLY=<true|false>- The default value is false. This can be used to detect any errors during pre-requisites checks. The actual deployment will not happen when the value is set to “true”.

    • STANDYBY_START_OPTION=<OPEN | MOUNT | NOMOUNT | READ ONLY | READ ONLY WITH APPLY> - If this option is provided while patching the standby database, it will be started in the specified mode after patching. If the value is READ ONLY WITH APPLY, the MRP process will be started automatically. If this option is not provided:
      • Rolling applicable patch: The existing open_mode for the standby database will be archived before patching and it will be stored for the standby database after patching. If the open_mode for the standby database can not be retrieved, the standby database will be started in the default mode and a warning message will be shown. The process will not be stopped for any failure.
      • Non-rolling applicable patch: The standby database will be started in default mode and MRP process will not be started up.

    Note:

    This verb submits a procedure which must be completed before you can proceed with the next steps.
  • sql_sec

    Sequence of CPU/PSU/EXA

  • rolling

    Flag to indicate if the patches can be applied in rolling mode.

  • node_list

    Comma separated list of hosts where the patching needs to be (e.g. rac_node1,rac_node2).

  • startupDBAfterSwitch

    Flag to indicate if databases need to be started after the update operation only if the purpose is UPDATE_GI.

  • skipSwitchDatabase

    Flag to indicate if databases need to be started after the update operation with UPDATE_RACDB or UPDATE_DB purposes.

  • startupDatabase

    Flag to indicate if databases need to be started in this update operation with UPDATE_RACDB or UPDATE_DB purposes for standby databases in conjunction with 'skipSwitchDatabase' flag.

  • ignoreStandbyPrereq

    Updating a primary database requires that all standby attached to it sa flag to indicate if this prereqignored.

  • standbyAutoDeploy

    Flag to indicate if deploy function needs to be run for standby

  • blackoutguid

    Blackout guid to be passed to perform operation of UPDATE_RACDB purposparameter node_list is passed.When passed, the update procedure will not create a new blackout on the database instance and wi blackoutguid.

Examples

The following example goes over the deployment of Oracle Home.

Attach Oracle Home:

To merge Oracle Homes of two databases, provide the flag attach_home=true and type the same location in the input_file where the same version of the image is already deployed.

For more information, see Attach Oracle Homes in Enterprise Manager Lifecycle Management Administrator's Guide.

emcli db_software_maintenance -performOperation -name="Deploy Home"
 -purpose="DEPLOY_DB_SOFTWARE"
 -target_type=oracle_database
 -target_list=db1221
 -normal_credential="NORMAL:SYSMAN"
 -privilege_credential="ROOT:SYSMAN"
 -input_file="data:/deploy_OH.prop"
 -attach_home=true

Deploy GI Software:

emcli db_software_maintenance -performOperation -name="Deploy
 -1120407 GI Home"
 -purpose=DEPLOY_GI_SOFTWARE
 -target_type=input_file
 -target_list="CLUSTER1"
 -normal_credential="NC_HOST_CREDS:TESTSUPERADMIN"
 -privilege_credential="HOST_PRIV:TESTSUPERADMIN"
 -inputfile="data:/usr/oracle/deploy.txt"

Deploy Container Databases:

emcli db_software_maintenance -performOperation
-purpose="DEPLOY_CDB"
-target_name="<>CDB Name that is being patched"
-target_type="<target type>
-name="Operation Name”
-description="Operation description"
-db_prefix | db_name ="<DB Name prefix or DB name>"
–normal_credential="<credential name>"
–privilege_credential="<credential name>"
–database_credential="SYSDBA credential name>"

If you are using existing container:

emcli db_software_maintenance -performOperation 
-purpose="ATTACH_CDB"
-target_name="<CDB Name that is being patched>"
-target_type="<target type>"
-name="Operation Name”
-description="Operation description"
-destinationCDB ="<Container database to which PDBs will be migrated>"
–normal_credential="<credential name>"
–privilege_credential=”<credential name>"
–database_credential="<SYSDBA credential name>"

performOperation -Update

Description

The Update command is used for migrating listeners and updating Oracle Homes with the least amount of downtime:

Format

emcli db_software_maintenance -performOperation
  -name=""
  -purpose=""
  [-description=""]
  [-reportOnly="<true|false>"]
  [-workDir=""]
  [-start_schedule=""]
  [-inputfile="data:<file_location>"]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-sql_sec="<sql_sec>"]
  [-rolling="true|false"]
  [-node_list=""]
  [-startupDBAAfterSwitch="<true|false>"]
  [-skipSwitchDatabase="<true|false>"]
  [-startupDatabase="<true|false>"]
  [-ignoreStandbyPrereq="<true|false>"]
  [-standbyAutoDeploy="<true|false>"]
  [-blackoutguid="<true|false>"]

[ ]  indicates that the parameter is optional.
  • name

    This is the unique name of the operation.

  • purpose

    There are standard purposes that can be performed by fleet operations which can be:
    • MIGRATE_LISTENER

    • UPDATE_DB for single instance and SIHA

    • UPDATE_RACDB for RAC database and RAC one-node

    • UPDATE_GI for cluster

    • UPDATE_SIHA

  • target_type

    The type of target on which this operation is being performed. This can be "rac_database" for RAC and "oracle_database" for single instance databases.

  • target_list

    This is a comma separated list of targets which are to be migrated.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

  • privilege_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • rolling

    This is an optional flag with the default value as true. The update procedure works in "Rolling Patch" mode by default but you can override this if necessary.

  • start_schedule

    The date on which the stage and deploy is to be started if it is to be started in the future.

    Format: "start_time:yyyy/mm/dd HH:mm"

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
  • Input_file

    This file contains the following entries:

    • NEW_ORACLE_HOME_LIST= <path of new Oracle home>

      This is the location where the new Oracle Home will be installed on all the hosts. The Credential Owner must have read / write access to this location.

    • workingDir=<Name of temp directory>

    • dispatchLoc=<Dispatch location>

      This is the location where all scripts will be staged on the host. These scripts will be executed as a “root” user.

    • SKIP_PREREQUISITE_CHECKS=<true|false>- The default value is false.

    • SKIP_CVU_CHECK=<true|false>- The default value is false.

    • PREREQS_ONLY=<true|false>- The default value is false. This can be used to detect any errors during pre-requisites checks. The actual deployment will not happen when the value is set to “true”.

    • STANDYBY_START_OPTION=<OPEN | MOUNT | NOMOUNT | READ ONLY | READ ONLY WITH APPLY> - If this option is provided while patching the standby database, it will be started in the specified mode after patching. If the value is READ ONLY WITH APPLY, the MRP process will be started automatically. If this option is not provided:
      • Rolling applicable patch: The existing open_mode for the standby database will be archived before patching and it will be stored for the standby database after patching. If the open_mode for the standby database can not be retrieved, the standby database will be started in the default mode and a warning message will be shown. The process will not be stopped for any failure.
      • Non-rolling applicable patch: The standby database will be started in default mode and MRP process will not be started up.

    Note:

    This verb submits a procedure which must be completed before you can proceed with the next steps.

Examples

Migrating the Listeners

If there are listeners running from the database home, use the following verb to migrate them to the parallel Oracle Home, you can use this command to migrate the listeners running from Oracle database homes. Grid Infrastructure homes are automatically migrated during the GI update process.

emcli db_software_maintenance -performOperation
 -name="Update Listener"
 -purpose=migrate_listener
 -target_type=oracle_database
 -target_list="DB1"
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST PRIV:SYSMAN"
 start_schedule

Updating the Database / Cluster

After the stage and deploy operations are completed, the grid infrastructure instances should be migrated to the newly deployed Grid Infrastructure Homes.

emcli db_software_maintenance -performOperation
 -name="Update Cluster"
 -purpose=UPDATE_GI
 -target_type=cluster
 -target_list=CLUSTER1
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST PRIV:SYSMAN"
 [-rolling=<true/false]

To update an Oracle Database, database credentials can be provided using the flag -database_credential="DB_SYS_CREDS:SYSMAN". If the credentials are not provided with this flag, the preferred set credentials will be used instead.

The TDE wallet password must be provided in the input file -input_file="data:<INPUT.PROPERTIES>". If the TDE configuration fails or database credentials are not provided, the database update will continue without TDE configuration.

For UPDATE_PDB:
  • TDE must already be configured in the destination CDB.
  • Source and destination passwords must be included in the input file.

    Example:

    srcWalletPassword=<SOURCE_PASSWORD>

    destWalletPassword=<DESTINATION_PASSWORD>

Node Wise RAC Database / Cluster Update

A cluster update always requires that all the RAC database instances running on that node be shut down during the switch process of the cluster instance. Hence, a cluster update followed by a RAC database updates results in an instance getting restarted twice.

There may be several situations where the administrator may require more control over the switch process. For example, the administrator may choose to perform a node-wise update of the cluster and RAC databases in order to avoid multiple restarts of the database instances. The administrator may also need to perform node specific pre-post steps.

emcli db_software_maintenance -performOperation -name="Update Cluster"
 -purpose=UPDATE_GI
 -target_type=cluster
 -target_list=CLUSTER1
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST_PRIV:SYSMAN"
 -rolling=true 
 -node_list="host1.example.com"
 –startupDatabase=false
This option provides this control by enabling the user to perform the following tasks for each node:
  • Switch the cluster instance.

  • Leave the RAC database instances shutdown.

    For example, consider RAC databases RACDB_112 and RACDB_121 are running on this cluster. The instances RACDB_112_1 and RACDB_121_1 running on this specific node will continue to remain shut down after the cluster instance is switched.

  • Switch all the RAC database instances on the same node.

  • This step will switch the instances RACDB_112_1 and RACDB_121_1 to the new home and will restart the same.

    For example, consider RAC databases RACDB_112 and RACDB_121 are running on this cluster. The instances RACDB_112_1 and RACDB_121_1 running on this specific node will continue to remain shut down after the cluster instance is switched.

emcli db_software_maintenance -performOperation
 -name="Update RAC DB"
 -purpose=UPDATE_RACDB
 -target_type=rac_database
 -target_list=RACDB
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST_PRIV:SYSMAN"
 -rolling=true
 -node_list="host1.example.com"

performOperation -Rollback

Description

This command is used to switch the database back to the previous Oracle home after the Update operation has been completed.

Format

emcli db_software_maintenance -performOperation
  -name=""
  -purpose=""
  [-description=""]
  [-reportOnly="<true|false>"]
  [-workDir=""]
  [-start_schedule=""]
  [-inputfile="data:<file_location>"]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-sql_sec="<sql_sec>"]
  [-rolling="true|false"]
  [-node_list=""]
  [-startupDBAAfterSwitch="<true|false>"]
  [-skipSwitchDatabase="<true|false>"]
  [-startupDatabase="<true|false>"]
  [-ignoreStandbyPrereq="<true|false>"]
  [-standbyAutoDeploy="<true|false>"]
  [-blackoutguid="<true|false>"]

[ ]  indicates that the parameter is optional.
  • name

    This is the unique name of the operation.

  • purpose

    There are standard purposes that can be performed by Fleet Operations which cane be:

    • ROLLBACK_DB

    • ROLLBACK_RACDB

    • ROLLBACK_GI

    • ROLLBACK_SIHA

  • target_type

    The type of target being provided in this operation which can "rac_database" or "oracle_database”.

  • target_list

    This is a comma separated list of targets which need to be patched.

    • Targets of homogenous types are supported in a single fleet operation.

    • A unique list of hosts based on this target list is displayed and start stage of Oracle home software on those hosts.

    • If targets running from the same Oracle home are provided in this list, the stage and deploy operation will be started only once and not for all targets.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:
    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

  • privilege_credential
    This must be entered in the format <Named Credential: Credential Owner> where:
    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • non_rolling

    By default, rollback is performed on all nodes. If the non_rolling back flag is enabled, you can select the list of nodes (using the node_list command) that are to be rolled back.

  • rolling

    By default rollback is performed in rolling fashion. This flag is used when the current Oracle home has patches that were applied in non-rolling mode (OJVM) and need to be rolled back.

  • node_list

    This is a comma separated list of hosts on which the instances need to be updated.

    For example: If RACDB is running on a 4 node cluster host1, host2, host3, and host4 and you choose to update the instances in only 2 hosts at a time, the value of this parameter needs to be specified as node_list="host1, host2".

  • Input_file

    This file contains the following entries:

    • NEW_ORACLE_HOME_LIST= <path of new Oracle home>

      This is the location where the new Oracle Home will be installed on all the hosts. The Credential Owner must have read / write access to this location.

    • workingDir=<Name of temp directory>

    • dispatchLoc=<Dispatch location>

      This is the location where all scripts will be staged on the host. These scripts will be executed as a “root” user.

    • SKIP_PREREQUISITE_CHECKS=<true|false>- The default value is false.

    • SKIP_CVU_CHECK=<true|false>- The default value is false.

    • PREREQS_ONLY=<true|false>- The default value is false. This can be used to detect any errors during pre-requisites checks. The actual deployment will not happen when the value is set to “true”.

    • STANDYBY_START_OPTION=<OPEN | MOUNT | NOMOUNT | READ ONLY | READ ONLY WITH APPLY> - If this option is provided while patching the standby database, it will be started in the specified mode after patching. If the value is READ ONLY WITH APPLY, the MRP process will be started automatically. If this option is not provided:
      • Rolling applicable patch: The existing open_mode for the standby database will be archived before patching and it will be stored for the standby database after patching. If the open_mode for the standby database can not be retrieved, the standby database will be started in the default mode and a warning message will be shown. The process will not be stopped for any failure.
      • Non-rolling applicable patch: The standby database will be started in default mode and MRP process will not be started up.

    Note:

    This verb submits a procedure which must be completed before you can proceed with the next steps.

Examples

Rollback RAC DB

emcli db_software_maintenance -performOperation
 -name="Rollback RAC DB"
 -purpose=ROLLBACK_RACDB
 -target_type=rac_database
 -target_list=RACDB
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST_PRIV:SYSMAN"
 [-rolling=true/false]
 [-node_list="host1.example.com"]

performOperation -Cleanup

Description

User can cleanup a Oracle Home by providing the target name in -target_list and -target_type=oracle_home.

Format

emcli db_software_maintenance -performOperation 
-name="cleanup"
-purpose="CLEANUP_SOFTWARE"
  [-description=""]
  [-reportOnly="<true|false>"]
  [-workDir=""]
  [-start_schedule=""]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-force=true]
  

Note:

The user can perform a cleanup in two ways:
  • The user can pass the database in -target_list and pass -target_type=<oracle_database/rac_database> and the script will perform the cleanup to the attached Oracle Home.
  • The user can pass the Oracle Home as a target in -target_list and the script will validate and perform the cleanup.

If any target is associated with the given home, Cleanup will be not done for the given home. User has to provide homes on all the nodes for a RAC before Cleanup can be done.

  • description

    Description of the operation.

  • reportOnly

    This is used in case of CLEANUP_SOFTWARE where the user wishes to clean Oracle Homes that are candidates for deletion, but does not want to perform the actual cleanup operation.

  • workDir

    Work directory location.

  • target_type

    The type of target on which this operation is being performed.

  • target_list

    This is a comma separated list of targets that need to be patched.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

  • privilege_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • start_schedule

    The date on which the stage and deploy is to be started if it is to be started in the future.

    Format: "start_time:yyyy/mm/dd HH:mm"

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
  • force

    This is an optional flag. If the cleanup of oracle home affects the database, the user can provide <-force=true> flag to skip this verification. Default value for this flag is false.

Example

emcli db_software_maintenance -performOperation 
-name="cleanup"
-purpose="CLEANUP_SOFTWARE" 
-target_list=OraDB12Home_host.com:1111
-target_type=oracle_home 
-normal_credential=NORMAL:SYSMAN
-privilege_credential=ROOT:SYSMAN
-workDir=/tmp