Patching Oracle Database
To patch an Oracle database, you move the database home to a new home, which includes the patches you want to implement.
rhpctl move database
command to move one or more database homes to a working copy of the same database release level. The databases may be running on a working copy, or on an Oracle Database home that is not managed by Fleet Patching and Provisioning.
-nonrolling
option to perform patching in non-rolling mode. The database is then completely stopped on the old ORACLE_HOME
, and then restarted to make it run from the newly patched ORACLE_HOME
.
Note:
Part of the patching process includes applying Datapatch. When you move an Oracle Database 12c release 1 (12.1) or higher, Fleet Patching and Provisioning completes this step for you. When you move to a version previous to Oracle Database 12c release 1 (12.1), however, you must run Datapatch manually. Fleet Patching and Provisioning is Oracle Data Guard-aware, and will not apply Datapatch to Oracle Data Guard standbys.Workflow for Database Patching
Assume that a database namedmyorcldb
is running on a working copy that was created from an Oracle Database 12c release 2 (12.2) gold image named DB122
. The typical workflow for patching an Oracle Database home is as follows:
Patching Oracle Database in a Data Guard Environment
Oracle Fleet Patching and Provisioning Server checks if the role of the
database allows the execution of datapatch
and acts accordingly.
For example, if the database role is primary, Oracle FPP runs
datapatch
at the end of the moving process, and does not run
datapatch
if the database role is physical standby.
However, Oracle FPP is not aware of the standby topology and does not
check for the patching level of the working copy on the standby locations. You must
ensure that the standby database is always moved to a patched working copy before
moving the primary database. Also, if you move the standby database to a patched
working copy and a switchover or a failover occurs before moving the primary
database to the patched working copy, it is possible that datapatch
has not been executed on the primary database. This is because both sites have been
moved to the patched working copy when the role was physical standby. In this case,
you must run datapatch
manually on the primary database.
Patching Oracle Database Using Batches
During database patching, Fleet Patching and Provisioning can sequentially process batches of nodes, with a number of nodes in each batch being restarted in parallel. This method maximizes service availability during the patching process. You can define the batches on the command line or choose to have Fleet Patching and Provisioning generate the list of batches based on its analysis of the database services running in the cluster.
Adaptive Oracle RAC-Rolling Patching for OJVM Deployments
In a clustered environment, the default approach for applying database maintenance with Fleet Patching and Provisioning is Oracle RAC rolling. However, non-rolling may be required if the new (patched) database home contains OJVM patches. In this case, Fleet Patching and Provisioning determines whether the rolling approach is possible, and rolls when applicable. (See MOS Note 2217053.1 for details.)