Upgrade a Database

This article describes the procedure to upgrade a database in a DB system by using the Console and the API.

For Oracle Database release and software support timelines, see Release Schedule of Current Database Releases (Doc ID 742060.1) in the My Oracle Support portal.

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

Review the following prerequisites to upgrade an Oracle Database in a DB system.

For detailed information, see:

About Upgrading Databases

Review the following information about database software version upgrades.

Upgrading Databases that have Data Guard Association

For databases with a Data Guard association, you must always upgrade the standby database first and then the primary database. The upgrade options are available in the Console for Data Guard associations created using the Console. However, if you have a database that does not have a Data Guard association but is configured as a primary or standby database manually, then the following apply for upgrading such databases.

After successful upgrade of both primary and standby databases, perform the following.

  1. For database versions 11.2 and 12.1, enable the Data Guard configuration you previously disabled before the upgrade.
  2. Check the open mode of the standby database.
  3. Drop the GRP created on standby.

How the Database Upgrade Operation is Performed by the Database Service

During the database upgrade process, the following steps are automatically performed:

Roll Back a Failed Database Upgrade

Note: The rollback operation is available for Oracle Database Enterprise Editions only.

If your database upgrade does not complete successfully, then you have the option of performing a rollback. Following an unsuccessful database upgrade operation, the rollback option is provided in a banner message displayed on the Database Details page.

Review the following information before you begin rollback.

For databases in Data Guard associations, the rollback must be performed according to the following steps.

Note: You must always rollback the primary database first and then the standby database.

Generally, when you rollback the database using the rollback option in the Console, the following steps are taken care of by the database service automatically.

  1. Execute flashback.
  2. Change Database Home.
  3. Drop GRP.

You can rollback a successful standby database upgrade only using CLI.

For more information about the steps to perform a rollback using the Console, see Roll Back a Failed Database Upgrade.

After Your Database Upgrade is Complete

After a successful upgrade, note the following:

Managing Guaranteed Restore Points

Listing Guaranteed Restore Points

You can use the following statement to list all the GRPs using the V$RESTORE_POINT View.

SELECT NAME FROM V$RESTORE_POINT WHERE GUARANTEE_FLASHBACK_DATABASE='YES';

For more information, see Listing Restore Points Using the V$RESTORE_POINT view in Oracle Database Backup and Recovery User’s Guide.

Dropping Guaranteed Restore Points

You can use the following statement to drop a GRP using the DROP RESTORE POINT statement.

DROP RESTORE POINT <grp name>;

where, grp name is the name of the GRP that must be dropped.

For more information, see Dropping Restore Points in Oracle Database Backup and Recovery User’s Guide.

Upgrade a Database

Perform the following steps to upgrade the database from an older release to a higher major release version using the OCI Console:

  1. On the DB Systems list page, select the DB system that contains the database 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 Databases tab, select the database that you want to work with.
  3. On the database details page, select the Updates tab to view the list of available upgrades for the database.

    The latest approved Release Update is available by default. You can also select one of the two preceding Release Updates (N-1 or N-2) after acknowledging the message displayed. To use a Release Update older than N-2, you must submit a Service Request.

  4. 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 upgrade is being applied, the State displays as Upgrading. The status of the database also displays as Upgrading. Lifecycle operations on the database and its resources might be temporarily unavailable. If the upgrade completes successfully, the State changes to Applied and the status of the database changes to Available.

View the Database Upgrade History

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

  1. On the DB Systems list page, select the DB system that contains the database 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 Databases tab, select the database that you want to work with.
  3. On the details page, select the Update History tab to view the history of update and upgrade operations for that database.

Roll Back a Failed Database Upgrade

Prerequisites

Procedure

Perform the following steps to rollback a failed database upgrade to the previous Oracle Database version using the OCI Console:

  1. On the DB Systems list page, select the DB system that contains the database 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 Databases tab, select the database that you want to work with.
  3. When there is an unsuccessful upgrade, a banner with a Rollback button will be displayed on top of the database details page.
  4. Select Rollback and confirm.

Convert a Non-Container Database To an Oracle Database 19c PDB

This topic applies to databases upgraded from Oracle Database 11.2 to Oracle Database 19c. As part of the conversion process, you create a new container database (CDB) to hold the pluggable database (PDB) created by the conversion of the non-CDB. To convert a non-container database to a PDB that uses a later version of Oracle Database than 19c, follow the steps in this topic, then upgrade the resulting 19c database to a later software version, as described in Upgrade a Database.

Convert a Non-CDB to a PDB Using the Console

  1. On the DB Systems list page, select the DB system that contains the database 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 Databases tab, select the database that you want to work with.
  3. On the database details page, on the Database information tab, review the Database architecture field to confirm that the database is a non-container database.
  4. On the database details page, from the Actions menu, select Convert to PDB.
  5. In the Convert non-CDB database to pluggable database panel, provide the following information in the Container database details section:
    • Container database name: Provide a name for the new CDB that will hold your converted PDB.
    • Password: Provide a password for the new CDB.
    • Confirm password: Reenter the CDB password.
    • Use the administrator password for the TDE wallet: Uncheck this option if you want to set a separate password for the TDE wallet. After you uncheck the option, the following fields display:
      • Enter TDE wallet password: Provide a TDE wallet password for the new CDB.
      • Confirm TDE wallet password: Reenter the TDE wallet password.
  6. In the Non container database details section, enter the existing TDE wallet password of the non-CDB that you are converting.
  7. Select Precheck to perform a precheck, or select Convert to PDB if you are ready to convert the database.

    Note: After you run a precheck, you are returned to the database details page in the Console. To start the conversion operation, follow all the steps in this topic again, and select the Convert to PDB option in the final step.

After the database has been successfully converted, the Database Details page in the Console displays Container database in the Database architecture field. This field is located in the Database information tab of the database details page.

Troubleshooting Tips for Converting a Non-CDB to a PDB

If your conversion operation does not complete successfully, you can troubleshoot the issue using the database cli (dbcli) command line utility. For more information about database cli, see Oracle Database CLI Reference.

To troubleshoot:

  1. Login to the DB system as described in Overview of Connecting to a DB System.
  2. Use the dbcli list-jobs command to determine the job ID and status of the unsuccessful database conversion operation.
  3. Use the dbcli describe-job command to display details about the unsuccessful database conversion operation.

Based on the information retuned by the dbcli describe-job command, you can try to resolve the issue that caused the conversion operation to fail. For errors that occur during the plugging in process (when the new PDB is being plugged into the new CDB), contact Oracle Support for assistance in completing the conversion after the issue that caused the failure has been resolved.

If a conversion operation fails, the console might display either 2 databases in the DB system, or display only a terminated database. The DB system can take up to 2 hours to reset itself. If the Console no longer shows 2 databases or a single terminated database, you can try the conversion again. If the DB system does not reset itself and allow you to try again, contact Oracle Support.