Upgrade a DB System

This article describes the procedures to upgrade the operating system (OS) and Grid Infrastructure (GI) in DB systems using the Console and the API.

You can now upgrade the operating system to Oracle Linux 8 (OL8) and the Oracle Grid Infrastructure to 19c in your DB system.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be granted security access in a policy by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment to work in.

For administrators: The policy in Let database admins manage Oracle Cloud database systems lets the specified group do everything with databases and related Database resources.

If you're new to policies, see Getting Started with Policies and Common Policies. If you want to dig deeper into writing policies for databases, see Details for the Database Service.

Prerequisites

The following are required to upgrade a DB system:

  • The DB system must use Oracle Linux 6 (OL6) or Oracle Linux 7 (OL7).
  • Oracle recommends having a complete standalone backup of the database.

Note:

Oracle Linux Release 7 (OL7) on Base Database Service is nearing its end of life (EOL). For more information, see Support Timeline for Oracle Linux Release 7 (OL7) on Base Database Service (Doc ID 3056652.1).

About Upgrading a DB System

For DB system upgrades, note the following:

  • Oracle recommends having a complete standalone backup of the database.
  • You can upgrade the Grid Infrastructure software version 19c or 21c to Grid Infrastructure software version 23ai. All earlier Grid Infrastructure versions must be first upgraded to 19c.
  • The DB system must use Oracle Linux 8 (OL8) to upgrade the Grid Infrastructure software version to 23ai.
  • The DB system must use Oracle Linux 6 (OL6) or Oracle Linux 7 (OL7) to upgrade the Grid Infrastructure software version to 19c.
  • You could upgrade the operating system to OL8 from OL6 or OL7.
  • When you are on OL7, only the OS will be upgraded to OL8. The GI will not be upgraded.
  • Databases earlier than 19.21 or 21.12 will be launched with OL7, which includes restoring a backup or a Data Guard standby creation. Databases from 19.21 or 21.12 onwards will always be provisioned with OL8. The OS version of a new DB system (restore or Data Guard) will therefore depend on the database version, regardless of the OS of the source DB system. If you require OL7 with the latest (e.g., 19.21 or 21.12) database update, you need to launch with an older DB version (e.g., 19.20 or 21.11) and update to the latest version.
  • DB system upgrades involve some downtime (even on RAC DB systems). Plan and schedule your upgrade accordingly.
  • Oracle recommends disabling the automatic backups before executing the upgrade.

    Note:

    The upgrade process will itself disable and re-enable the automatic backup. However, Oracle recommends you do it after careful consideration.
  • The upgrade process creates a new compute instance and clones the data disks.
  • The private IP addresses and hostnames are carried over to the upgraded DB system.
  • The ephemeral public IP addresses are not carried over and will change in the upgraded DB system.
  • Oracle recommends not to launch any new instances within the subnet of the DB system. There is a short interval when the private IP addresses and hostnames are "free" during the upgrade process. During this interval, launching any new instance could reserve the "free" IP addresses and block the upgrade process.

    Note:

    If any instances block the upgrade process, the upgrade process will automatically continue after you terminate the blocking instance.
  • All changes to the OS will be removed and are not carried over to the new OS.
  • All changes to Clusterware other than the database and services will be removed and are not carried over to the new GI stack.
  • For databases with a Data Guard association, the upgrade is only allowed on the standby site. It ensures no re-instantiation is required as the standby could be ahead of the primary in case of rollback.
  • Oracle recommends switching the Data Guard association to "Maximum Performance" before the upgrade, as otherwise, the primary will run into NET_TIMEOUT, and a reset of the configuration is required afterward. After the upgrade, if required, you can turn it to "Maximum Availability".

Roll Forward a Failed Upgrade

You can roll forward upgrades that did not complete successfully for the following reasons using the Oracle support team.

  • Database registration failed.
  • Database startup failed even after a successful upgrade of OS and GI.

Roll Back a Failed Upgrade

You can roll back upgrades that did not complete successfully. A rollback resets your DB system to the state before the upgrade. All changes to the DB system made during and after the upgrade will be lost.

Note:

The public IP addresses present before the upgrade process would have changed and cannot be reclaimed.

After the rollback, you can try upgrading the DB system again after finding and fixing the cause of the earlier upgrade failure.

After your Upgrade is Complete

After a successful upgrade, note the following:

  • Check that automatic backup is enabled for the database if you disabled them before upgrading.
  • The upgrade exchanges the boot volume. So all customization of the OS will be removed (and have to be reapplied by the customer).
  • As the GI stack is reinstalled, you have to reapply all Clusterware customizations (like services, additional virtual IPs, etc.).
  • Check that automatic backup is enabled for the database if you had disabled them before upgrading.

Upgrade the Operating System of a DB System

Perform the following steps to upgrade the operating system (OS) of a DB system using the OCI Console:

  1. On the DB Systems list page, select the DB system that you want to work with. If you need help finding the list page or the DB system, see List the DB Systems.
  2. On the details page, select the Updates (OS) tab to view the list of available OS upgrades for the DB system.
  3. From the Actions menu for the upgrade you are interested in, select one of the following actions:
    • View details: View the details about this upgrade.
    • Precheck: Check for any prerequisites to ensure that the upgrade can be successfully applied.
    • Apply update: Applies the selected upgrade. Oracle recommends that you run the precheck operation for an upgrade before applying it.

In the list, the State displays the status of the operation. While an update is being applied, the State displays as Updating. The status of the DB system also displays as Updating. Lifecycle operations on the DB system and its resources might be temporarily unavailable. If the update completes successfully, the State changes to Applied and the status of the DB system changes to Available.

Upgrade the Grid Infrastructure of a DB System

Perform the following steps to upgrade the Grid Infrastructure (GI) of a DB system using the OCI Console:

  1. On the DB Systems list page, select the DB system that you want to work with. If you need help finding the list page or the DB system, see List the DB Systems.
  2. On the details page, select the Updates (GI) tab to view the list of available Grid Infrastructure upgrades for the DB system.
  3. From the Actions menu for the upgrade you are interested in, select one of the following actions:
    • View details: View the details about this upgrade.
    • Precheck: Check for any prerequisites to ensure that the upgrade can be successfully applied.
    • Apply update: Applies the selected upgrade. Oracle recommends that you run the precheck operation for an upgrade before applying it.

In the list, the State displays the status of the operation. While an update is being applied, the State displays as Updating. The status of the DB system also displays as Updating. Lifecycle operations on the DB system and its resources might be temporarily unavailable. If the update completes successfully, the State changes to Applied and the status of the DB system changes to Available.

View the Upgrade History of a DB System

Perform the following steps to view the upgrade history of a DB system using the OCI Console:

  1. On the DB Systems list page, select the DB system that you want to work with. If you need help finding the list page or the DB system, see List the DB Systems.
  2. On the details page, select the Update History tab to view the history of update and upgrade operations for that DB system.

Roll Back a Failed Upgrade

Perform the following steps to roll back an unsuccessful upgrade of a DB system using the OCI Console:

  1. On the DB Systems list page, select the DB system that you want to work with. If you need help finding the list page or the DB system, see List the DB Systems.
  2. On the details page, select the Update History tab to view the history of update and upgrade operations for that DB system.
    • When there is an unsuccessful upgrade, an alert message will be displayed at the top of the page.
  3. Select Rollback and confirm.