Patching Oracle AI Database

To patch an Oracle AI Database using the out-of-place patching method, move the database to a new Oracle home that includes the required patches.

Use the 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 AI Database home that is not managed by Oracle Fleet Patching and Provisioning (Oracle FPP).

When the move operation is initiated by an Oracle FPP Server or Client, the version moved to must be a working copy of a gold image. You can also perform this operation using the independent automaton in an environment where no Oracle FPP Server is present. In this case, the source and destination homes are not working copies of gold images, but are two installed homes that you deployed with some method other than using Oracle FPP.

The working copy to which you are moving the database can be at a lower patch level than the current database home. This facilitates rollback in the event that you encounter any problems after moving to the higher level patched home.

The working copy to which you are moving the database home can be at the same patch level as the original working copy. This is useful if you are moving a database home from one storage location to another, or if you wish to convert an unmanaged home to a managed home while staying at the same patch level.

The rhpctl move database command performs out-of-place patching, minimizing the downtime necessary for maintenance. Oracle FPP also preserves the current configuration, enabling the rollback capability previously described. By default, Oracle FPP applies patches in a rolling manner, which reduces, and in many cases eliminates, service downtime. Use the -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:

Starting with Oracle AI Database 26ai, you can apply rolling patches and perform other maintenance operations locally for Oracle Real Application Clusters (Oracle RAC) and Oracle RAC One Node deployments. Use the -localrolling {YES|NO} parameter to enable or disable locall rolling patching.

When Oracle FPP performs out-of-place patching, it evaluates the list of non-rolling patches on the source and the destination homes. Oracle FPP compares the two lists, and if the target home has additional non-rolling patches that are not in the source home, the Oracle FPP reports that the patching cannot be performed in a rolling mode. You can then take one of the following actions:

  1. Re-provision the target home so that it does not include those additional non-rolling patches and proceed with patching in rolling mode.
  2. Continue with the rolling patching operation with the currently provisioned home using the -forcerolling option.

For information about patching using batches, refer to Patching Oracle Grid Infrastructure and Oracle AI Database Using Batches.

Note:

Part of the patching process includes applying Datapatch. When you move an Oracle AI Database, Oracle FPP completes this step for you. Oracle FPP is Oracle Data Guard-aware, and will not apply Datapatch to Oracle Data Guard standbys.

Workflow for Database Patching

Assume that a database named myorcldb 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 out-of-place patching of an Oracle AI Database home is as follows:

  1. Create a working copy of the Oracle AI Database that you want to patch, in this case DB122.
  2. Apply the patch to the working copy you created.
  3. Test and validate the patched working copy.
  4. Use the rhpctl add image command to create a gold image (for example, DB122_PATCH) from the patched working copy.

    Note:

    The working copy you specify in the preceding command must be hosted on the Oracle FPP Server in Oracle FPP-managed storage.

  5. Delete the patched working copy with the patched Oracle AI Database using the rhpctl delete workingcopy command.

    Note:

    Do not remove directly using the rm command or some other method, because this does not update the Oracle FPP inventory information.

  6. Create a working copy from the patched gold image, (DB122_PATCH).
  7. Move myorcldb to the working copy you recently created.
  8. When you are confident that you will not need to roll back to the working copy on which the database was running at the beginning of the procedure, delete that working copy using the rhpctl delete workingcopy command.

Related Topics