Fleet Maintenance EM CLI Operations

With Fleet Maintenance you can perform various different operations on your entire fleet with simple EM CLI commands. Fleet Maintenance allows you to simplify standardizing software configurations across your environment.

General Flow for Fleet Maintenance EM CLI Operations

For a successful Fleet Maintenance operation it is recommended you follow these steps in the order prescribed in this section:
  1. First perform Image Maintenance tasks, such as: creating a Gold Image, creating a new version of the image, and setting the new version of an image to current.
  2. Perform Subscription Tasks, such as: verifying image applicability, subscribing targets, and verifying the subscription.
  3. Once you have completed the image maintenance and subscription tasks, move forward to Deploy Operations.
  4. With the images deployed, you will have to Migrate the Listeners.
  5. After you have performed the update operations, you can perform the Update Operations on your targets.
  6. Should you encounter issues, you can perform Rollback Operations.
  7. Oracle highly recommends after patching you perform Cleanup Operations.
  8. For emergency one-off patching see: Emergency Patching

Available Target Types and Supported Operations

The following table shows the target types that are supported and the values you need to provide for the target_type and -purpose fields in EM CLI commands:

Entity Target Type Deploy Operations Update Operations Rollback Operations Cleanup Software Operation
Single Instance database

Note:

Available for Windows platforms
oracle_database deploy_db_software update_db

migrate_listener

For more information see: Migrating the Listeners

rollback_db cleanup_software
RAC database rac_database deploy_rac_software update_racdb rollback_rackdb cleanup_software
Oracle Restart has deploy_siha_software update_siha rollback_siha cleanup_software
Grid Infrastructure cluster deploy_gi_software update_gi rollback_gi cleanup_software
PDB oracle_pdb deploy_db_software

deploy_rac_software

deploy_cdb

attach_cdb

update_pdb rollback_pdb N/A
CDB/RAC CDB oracle_database

rac_database

deploy_db_software

deploy_rac_software

deploy_cdb

attach_cdb

update_db

update_racdb

rollback_db

rollback_racdb

cleanup_software
db_software_maintenance General Code Layout and Information
emcli db_software_maintenance -performOperation 
-name=<User Specified Operation>
-purpose=<Operation Type> 
-target_type=<target type> 
-target_list=<list of targets> 
-normal_credential=<credential name> 
-privilege_credential=<credential name> 
-rolling=<true/false> 
-input_file="data:<location of input file>"
  • name: This is the unique name of the operation.
  • purpose: Refer to the EM CLI Command Inputs Based on Entity Type table.
  • target_type: Refer to the EM CLI Command Inputs Based on Entity Type table.
  • 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.

  • 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. If the gold image has OJVM patches, you should mark this value as ‘false’ which will take all instances of RAC DB down for update. This option is applicable for DB patching only (not for Grid Infrastructure or Oracle Restart).
  • input_file: This is an optional parameter. The parameter(s) that can be specified here are: workingDir =<Name of temp directory>.

For a detailed tutorial on patching a single instance database using Fleet Management see: Patching a Single Instance Database Using Oracle Enterprise Manager Fleet Maintenance.