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:- 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.
- Perform Subscription Tasks, such as: verifying image applicability, subscribing targets, and verifying the subscription.
- Once you have completed the image maintenance and subscription tasks, move forward to Deploy Operations.
- With the images deployed, you will have to Migrate the Listeners.
- After you have performed the update operations, you can perform the Update Operations on your targets.
- Should you encounter issues, you can perform Rollback Operations.
- Oracle highly recommends after patching you perform Cleanup Operations.
- For emergency one-off patching see: Emergency Patching
Note:
Do not perform lifecycle management activities during a patching window, as the monitoring credentials are locked during patching and cannot be modified, created or deleted. Examples of the activities to avoid performing during a patching window: provisioning, patching, cloning, migration and similar activities from Self-service portal for DBaaS/PDBaaS.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
For more information see: Migrate 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
|
update_pdb |
rollback_pdb |
N/A |
CDB/RAC CDB | oracle_database
|
deploy_db_software
|
update_db
|
rollback_db
|
cleanup_software |
db_software_maintenance
General Code Layout and Informationemcli 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.
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.