Update Operations

Update operations are the most common operations performed within Fleet Maintenance. There are two types of supported UPDATE scenarios: updates and upgrades. An update is a minor improvement operation, moving an Oracle Home from one patch set to another (Ex: 19.17.0 to 19.19.0) whereas an upgrade, is a major improvement, moving an Oracle Database from one major release to another (ex: 12.2.0.1 to 19.19 or 18.x to 19.x). All the steps such as Gold Image creation, image subscription and deploy image remain the same.

Before you begin an update operation using EM CLI ensure the current version of the subscribed image for a target is deployed.

Note:

  • Currently we do not support node-wise update for Upgrades. The update command for “Database Upgrade” requires database credentials to be provided as part of the command.
  • When performing RAC or GI updates and upgrades it is a best practice to specify a working directory that is not a shared location between two nodes. This helps avoid overwriting checkpoint files and potential update failures.
  • Before performing an UPDATE operation, if your listener is in a custom location, be sure to first set the TNS_ADMIN environment variable to this location . Next, restart the agent and then proceed with these operations.
  • If during a database or RAC update you need to update any static entry and your listener.ora is located in the Grid Oracle Home default location ($GI_HOME/network/admin) normal credentials will not work (for example DB Home Owner). This is because the owner of the file is the Grid Home owner; make sure the file has permissions to at least group level to be modified by both Database and Grid Oracle Home Users.
  • Refer to the Oracle Database Upgrade Guide for the supported upgrade paths.
  • Starting with Enterprise Manager 13c Release 5 Update 5 (13.5.0.5) you can now update a non Container Database (CDB) into a new Pluggable Database using Fleet Maintenance, select Upgrade Non-CDB as Pluggable Database under Operation to filter databases that are available for this type of upgrade. This type of upgrade, takes a non CDB database and performs an upgrade into a new PDB. For a step by step tutorial see: Patching an Oracle Pluggable Database Using Oracle Enterprise Manager's Fleet Maintenance Graphic User Interface.
  • Starting with Enterprise Manager 13c Release 5 Update 17 (13.5.0.17) logical standby database upgrade must be performed using the Fleet Maintenance UI. Non-rolling updates are no longer be available through the main database menu.

UPDATE_DB

This command moves an Oracle Database from its Oracle Home to the newly created Gold Image standard Oracle Home.
emcli db_software_maintenance 
-performOperation -purpose=”UPDATE_DB” 
—target_list=”db1221” 
—target_type=”oracle_db” 
—name=”Operation Name” 
–description=”Operation description” 
-normal_credential="NORMAL:SYSMAN" 
-privilege_credential=”PRIV:SYSMAN” 
—database_credential=”DB_SYS_CREDS:SYSMAN”

Note:

For Windows Single Instance database update operations use windows_sec_credential="Named Credential: Credential Owner" instead of privilege_credential. Starting with Enterprise Manager 13. Release Update 2 you can also use either –is_virtual_account="true" or –is_builtin_account="true" accounts.
Examples:
emcli db_software_maintenance -performOperation -name="Update SIDB" -purpose=UPDATE_DB 
-target_type=oracle_database -target_list="ORCL1910.abc.sample.com" -rolling=false 
-normal_credential="LOCALADMIN:SYSMAN" -windows_sec_credential="LOCALUSERCRED:SYSMAN" 
-database_credential="SYSDBA:SYSMAN"
emcli db_software_maintenance -performOperation -name="Update SIDB" -purpose=UPDATE_DB 
-target_type=oracle_database -target_list="ORCL1910.abc.sample.com" -rolling=false 
-normal_credential="LOCALADMIN:SYSMAN" 
–is_virtual_account="true" -database_credential="SYSDBA:SYSMAN"
emcli db_software_maintenance -performOperation -name="Update SIDB" -purpose=UPDATE_DB 
-target_type=oracle_database -target_list="ORCL1910.abc.sample.com" -rolling=false 
-normal_credential="LOCALADMIN:SYSMAN" –is_builtin_account="true" 
-database_credential="SYSDBA:SYSMAN"

UPDATE_PDB

Moves a Pluggable Database from its predecessor container to the newly available successor container. This can be executed only if the Attach CDB / Deploy CDB operation has been performed.
emcli db_software_maintenance 
-performOperation -purpose=”UPDATE_PDB” 
—target_list=”pdb1331” 
—target_type=”oracle_pdb” 
—name=”Operation Name” 
–description=”Operation description” 
-normal_credential="NORMAL:SYSMAN" 
-privilege_credential=”PRIV:SYSMAN” 
—database_credential=”DB_SYS_CREDS:SYSMAN”

UPDATE_GI

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" 
-node_list="host1.example.com" 
–startupDatabase=<true/false>
-SKIP_CVU_CHECK=<true/false>
-drain_timeout=<seconds>
For a use case on UPDATE_GI and a detailed explanation see: Node Wise RAC Database / Cluster Update

SKIP_CVU_CHECK: This flag allows skipping the CVU check if set to true. This is an optional flag only used for UPDATE_GI and UPDATE_SIHA operations.

When performing UPDATE_GI operations and you need to pass multiple clusters in the -target_list, -node_list is not supported.

To avoid service interruptions, patching of Oracle Grid Infrastructure is done most of the time in a rolling manner. While the database instance is brought down on the node that is getting patched. However, RAC databases remain up on the remaining nodes.

Oracle Grid Infrastructure patches in a rolling manner to avoid service interruption. The database instance is brought down only on the patched node, while RAC databases continue running on the remaining nodes. Starting with Oracle Enterprise Manager 13.5 Release Update 17 (13.5.0.17) Fleet Maintenance you can use the DRAIN_TIMEOUT parameter to reduce the overall downtime for the node being patched. For the UPDATE_GI and UPDATE_RACDB cases, you can leverage the Grid Infrastructure capabilities to shutdown instances on one node in parallel. Define the DRAIN_TIMEOUT value (in seconds) when using the db_software_maintenance EM CLI verb. If the DRAIN_TIMEOUT parameter is not specified, the default drain time specified at service creation will be used.

When specifying the drain time in seconds, to allow for resource draining to complete and services to stop, the following are accepted values:
  • DRAIN_TIMEOUT=0: Drain occurs immediately, database instances are shutdown immediately.
  • DRAIN_TIMEOUT=<time>: Time in seconds allowing for the drain to occur before database instances are shutdown.
  • DRAIN_TIMEOUT is not specified in the input file, the default drain timeout specified at database service creation will be used. This is the default option.

UPDATE_GIMR

Note:

From Oracle Database 21c onward, the GIMR update is now separated from GI update or patching. Performing an update of both GI and GIMR will happen in 2 separate operations.
Before starting a GIMR update, make sure that you have completed the DEPLOY_GIMR_SOFTWARE instructions outlined in: Deploy an Oracle Grid Infrastructure Database.
emcli db_software_maintenance 
-performOperation 
-name="Update GIMR 21c"
-purpose=UPDATE_GIMR 
-target_type=cluster  
-target_list= <cluster  target name>
-normal_credential="NC_HOST_CREDS:SYSMAN" 
-privilege_credential="HOST_PRIV:SYSMAN"  

UPDATE_RACDB

The EM CLI command format for UPDATE_RACDB :
emcli db_software_maintenance -performOperation -name="Update RAC DB" 
-purpose=UPDATE_RACDB 
-target_type=<target_type> 
-target_list==<List of targets> 
-normal_credential="NC_HOST_CREDS:SYSMAN" 
-privilege_credential="HOST_PRIV:SYSMAN" 
-database_credential=<SYSDBA credentials of the database>
-rolling=<true/false> 
-node_list="host1.example.com"
-drain_timeout = <time in seconds>
  • 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 only 2 hosts at a time; the value of this parameter needs to be specified as node_list="host1, host2"

  • drain_timeout: This optional parameter can be used for both rolling and non rolling use cases and can be passed as an EM CLI argument or as an input_file parameter. This drain parameter is a time measure of seconds allowed in order to complete the resource draining action. By default, this parameter is not set.

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
For primary and standby databases, upgrades need to be done through the Rolling Upgrade user interface in Enterprise Manager. The wizard can be launched from the target database home page (either primary or standby database). On the Database home page, select Oracle Database, Provisioning, then select Upgrade Database.

UPGRADE_DB

This purpose is only to be used for non-CDB to PDB migration:

emcli db_software_maintenance 
-performOperation -purpose=”UPGRADE_DB” 
—target_list=”db1916” 
—target_type=”oracle_db” 
—name=”Operation Name” 
–description=”Operation description” 
-normal_credential="NORMAL:SYSMAN" 
-privilege_credential=”PRIV:SYSMAN” 
—database_credential=”DB_SYS_CREDS:SYSMAN”
-migrate_non_cdb_pdb="true"

Note:

migrate_non_cdb_pdb is only used when you want to migrate a database to a pluggable database where the source version is lower than 20c.

UPGRADE_RACDB

This purpose is only to be used for non-CDB to RAC migration:

emcli db_software_maintenance 
-performOperation -purpose=”UPGRADE_RACDB” 
—target_list=”db1221” 
—target_type=”oracle_db” 
—name=”Operation Name” 
–description=”Operation description” 
-normal_credential="NORMAL:SYSMAN" 
-privilege_credential=”PRIV:SYSMAN” 
—database_credential=”DB_SYS_CREDS:SYSMAN”
-migrate_non_cdb_pdb="true"

Note:

migrate_non_cdb_pdb is only used when you want to migrate a database to a pluggable database where the source version is lower than 20c.

Transparent Data Encryption (TDE) Support in Fleet Maintenance

Fleet Maintenance now supports updating Databases, Container Databases and Pluggable Databases that have tables encripted using TDE.

For Oracle Databases and Container Databases, using oracle_database Target_type, the TDE wallet password must be provided in the input file -input_file="data:/<file pathc>/input.properties" during UPDATE_DB

Example: srcWalletPassword=welcome123.

Note:

  • If the -database_credential is not provided, TDE configuration will be verified by connecting to the database using SQL*Plus.
  • If the wallet status is CLOSED, TDE configuration will be skipped.
  • After the migration completes, review the wallet status. If the status is Closed manually open the Wallet File to access the encrypted data in the database.

For Oracle Pluggable Databases, using oracle_pdb Target_type:

  • When executing UPDATE_PDB, the Database credentials should be provided using the existing flag -database_credential="DB_SYS_CREDS:SYSMAN". If the Database credentials are not provided, the preferred credentials, if set, will be used.
  • TDE must be already configured in the destination CDB
  • The TDE wallet source and destination passwords must be provided in the input file -input_file="data:/scratch/input.properties" during UPDATE_PDB

    Example: srcWalletPassword=welcome123, destWalletPassword=welcome123