Upgrading a Database

This topic describes the procedures to upgrade databases in bare metal and virtual machine DB systems by using the Console and the API. Currently upgrades to Oracle Database 19c (Long Term Release) are available.

Note

This topic is not applicable to Exadata Cloud Service instances.

Required IAM Policy

You must have the required type of access in a policy  to use Oracle Cloud Infrastructure, whether you're using the Console or the REST API with an SDK, CLI, or other tool. When running a command, if you see an error message that says you don’t have permission or are unauthorized, contact your administrator. Confirm the type of access you've been granted, and which compartment  you should work in.

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

If you're new to policies, see Getting Started with Policies and Common Policies. Details about writing policies for databases are located in Details for the Database Service.

Prerequisites

The following are required in order to upgrade a database on a bare metal or virtual machine DB system:

For databases on DB systems not meeting the minimum software version requirements, you can upgrade only after using the backup and restore operations to restore the database to a DB system that uses OL7 and version 19c Grid Infrastructure. See the following topics for more information on restoring a database to another DB system by using an on-demand full backup:

Your Oracle database must be configured with the following settings in order to upgrade:

  • The database must be in archivelog mode
  • The database must have flashback enabled

See the Oracle Database documentation for your database's release version to learn more about these settings.

About Upgrading a Database

For database software version upgrades, note the following:

  • Database upgrades involve some database downtime. Keep this in mind when scheduling your upgrade.
  • Oracle recommends that you back up your database and test the new software version on a test system before you upgrade. See Backing Up a Database for information on creating an on-demand manual backup.
  • Oracle recommends running an upgrade precheck operation for your database prior to attempting an upgrade so that you can discover any issues that need mitigation prior to the time you plan to perform the upgrade.
  • If your databases uses Data Guard, you will need to disable or remove the Data Guard association prior to upgrading.
  • An upgrade operation cannot take place while an automatic backup operation is underway. Before upgrading, Oracle recommends disabling automatic backups and performing a manual backup. See To configure automatic backups for a database and To create an on-demand full backup of a database for more information.
  • After upgrading, you cannot use automatic backups taken prior to the upgrade to restore the database to an earlier point in time.
  • If you are upgrading an database that uses version 11.2 software, the resulting version 19c database will be a non-container database.
  • The upgrade operation cannot be performed using the dbcli utility.

How the Upgrade Operation Is Performed by the Database Service

During the upgrade process, the Database service does the following:

  • Executes an automatic precheck. This allows the system to identify issues needing mitigation and to stop the upgrade operation.
  • Sets a guaranteed restore point, enabling it to perform a flashback in the event of an upgrade failure.
  • Creates a new Oracle Database Home based on the specified Oracle-published or custom database software image.
  • Runs the Database Upgrade Assistant (DBUA) software to perform the upgrade.

Rolling Back an Unsuccessful Upgrade (Oracle Database Enterprise Editions Only)

If your upgrade does not complete successfully on a system using one of the Enterprise software editions, you have the option of performing a rollback. A rollback resets your database to the state prior to the upgrade. All changes to the database made during and after the upgrade will be lost. The rollback option is provided in a banner message displayed on the database details page of a database following an unsuccessful upgrade operation. See To roll back a failed database upgrade for more information.

After Your Upgrade Is Complete

After a successful upgrade, note the following:

  • Oracle recommends that you remove the old Oracle Database Home using the dbcli ultility. See Dbhome Commands in the dbcli reference for more information.
  • Check that automatic backups are enabled for the database. See To configure automatic backups for a database for more information.
  • Edit the Oracle Database COMPATIBLE parameter to reflect the new Oracle Database software version. See What Is Oracle Database Compatibility? for more information.
  • On virtual machine DB Systems, ensure that the .bashrc file in the home directory of the Oracle User has been updated to point to the 19c Database Home.

Using the Console

You can use the Console to:

  • Upgrade you database
  • View the update history of your database

Oracle recommends that you use the precheck action to ensure that your database has met the requirements for the upgrade operation.

To upgrade a database
  1. Open the navigation menu. Click > Database > Bare Metal, VM, and Exadata.
  2. Choose your Compartment.

    A list of DB systems is displayed.

  3. Find the DB system where the database is located, and click the system name to display details about it.

    A list of databases is displayed.

  4. Find the database you want to upgrade, and click its name to display details about it.
  5. Under Resources, click Updates.

    The Oracle Provided Database Software Images tab displays generally-available Oracle Database software images that you can use to upgrade your database to a higher major release version. Oracle images that can be used for upgrading have the update Type of "Upgrade". Note that only the most recent patch level of Oracle Database 19c and the next-most recent patch level can be used for the upgrade operation.

    The Custom Database Software Images tab allows you to select a database software image that you have created in advance. Use the Select a Compartment selector to specify the compartment that contains the database software image. Custom images that can be used for upgrading have the update Type of "Upgrade". Note that only the most recent patch level of Oracle Database 19c and the next-most recent patch level can be used for the upgrade operation.

  6. Review the list of Oracle provided or custom database software images that you can use to upgrade your database, and identify an image you want to use for the upgrade.
  7. Click Actions (three dots) on the row of the image you want to use for the upgrade, and then select one of the following actions:

    • Precheck: Check for any prerequisites to ensure that the upgrade can be successfully applied. Oracle recommends that you manually perform a precheck operation prior to upgrading to ensure that your database is ready to be upgraded.
    • Upgrade: Applies the selected database upgrade.
  8. Confirm when prompted.
  9. While an upgrade is being applied, the database's status displays as Upgrading. If the operation completes successfully, the database's status changes to Available.

To view the upgrade history of a database
  1. Open the navigation menu. Click > Database > Bare Metal, VM, and Exadata.
  2. Choose your Compartment.

    A list of DB systems is displayed.

  3. To display details about the DB system where the database is located, and click the system name.

    A list of databases is displayed.

  4. To display details about the database you are interested in, locate the system name and click it.
  5. Under Resources, click Update History.

    The history of patch and upgrade operations for that database is displayed.

To roll back a failed database upgrade
Note

The upgrade rollback operation is only available for Enterprise software edition databases that were unsuccessfully upgraded and are currently in the "Failed" lifecycle state.
  1. Open the navigation menu. Click > Database > Bare Metal, VM, and Exadata.
  2. Choose your Compartment.

    A list of DB systems is displayed.

  3. Find the DB system where the database is located, and click the system name to display details about it.

    A list of databases is displayed.

  4. Find the database that was unsuccessfully upgraded, and click its name to display details about it. The database should display a banner at the top of the details page that includes a Rollback button.
  5. Click Rollback. In the Confirm rollback dialog, confirm that you want to initiate a rollback to the previous Oracle Database version by clicking Rollback.

Prerequisites

The following are required in order to upgrade a database on a bare metal or virtual machine DB system:

For databases on DB systems not meeting the minimum software version requirements, you can upgrade only after using the backup and restore operations to restore the database to a DB system that uses OL7 and version 19c Grid Infrastructure. See the following topics for more information on restoring a database to another DB system by using an on-demand full backup:

Your Oracle database must be configured with the following settings in order to upgrade:

  • The database must be in archivelog mode
  • The database must have flashback enabled

See the Oracle Database documentation for your database's release version to learn more about these settings.