Patching Oracle Database 21c Without Downtime

This procedure explains how to patch Oracle Database 21c with the latest patching without bringing down the database.

Before You Begin

You have an Oracle Database db21c that you want to patch to the latest patch level.

Ensure that the working copy db21c_psu based on the image DB21c_PSU contains the latest patches and is available.

Procedure

From the Fleet Patching and Provisioning Server, run one of the following commands as per your source and destination database:

  1. To patch an Oracle Database home managed by Fleet Patching and Provisioning, and there exist working copies of the source and destination databases, run:
    rhpctl move database -sourcewc db21c -patchedwc db21c_psu

    db21c is the source working copy of the database being patched

    db21c_psu is the working copy of the Oracle Database software with patches applied, based on the image DB21c_PSU.

  2. To patch an unmanaged Oracle Database home (source working copy does not exist because the Oracle home is not managed by Fleet Patching and Provisioning), run:
    rhpctl move database -sourcehome /u01/app/orabase/product/21.0.0/dbhome_1
     -patchedwc db21c_psu -targetnode node1

    targetnode specifies the node on which the database to be upgraded is running, because the source Oracle Database is on a 21c cluster.

    /u01/app/orabase/product/21.0.0/dbhome_1 is the path of the database being patched

    db21c_psu is the working copy of the Oracle Database software with patches applied, based on the image DB21c_PSU.

    Use the saved gold image for standardized patching of all your databases of release 21c to the same patch level.
  3. If for some reason, you want to rollback the patches applied to a managed Oracle Database home, run:
    rhpctl move database -sourcewc db21c_psu 
    -patchedwc db21c -ignorewcpatches

    db21c is the working copy of the unpatched database to which you want to roll back.

    db21c_psu is the working copy of the Oracle Database software with patches applied, based on the image DB21c_PSU.

For all Oracle Databases, you can also specify these additional options with the move database command:

  • -keepplacement: For admin-managed Oracle RAC Databases (not Oracle RAC One Node Database), Fleet Patching and Provisioning retains the services on the same nodes after the move.

  • -disconnect: Disconnects all sessions before stopping or relocating services.

  • -drain_timeout: Specify the time, in seconds, allowed for resource draining to be completed for planned maintenance operations. During the draining period, all current client requests are processed, but new requests are not accepted. This option is available only with Oracle Database 12c release 2 (12.2) or later.

  • -stopoption: Stops the database.

  • -nodatapatch: Ensures datapatch is not run for databases you are moving.

Watch a video