Update a Database

This article describes the procedures to apply updates to databases in bare metal and virtual machine DB systems by using the Console and the API.

For information on updating DB systems and to see a list of currently available database updates, see Update a 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.

About Updating Databases

Oracle recommends updating the DB system before you update the database within that DB system. The Console displays the latest and the previous DB system updates available. You can use either of these updates, but Oracle recommends using the latest.

You can also update your database using a custom database software image. When updating with a software image, OCI supports updating with any image based on the current version or any of the three most recent past versions (N through N - 3).

The following applies only to Oracle based updates starting April 2022 updates for 12.1 and 12.2 and July 2022 updates for 19c.

If you have any One-Off updates installed, then those One-Off updates will be rolled back automatically before installing the new update. If the new update does not include the One-Off updates, you could install the One-Off update again after you complete installing the new update.

If you have any One-Off updates installed in your database, then to avoid installing One-Off updates after the new update, Oracle recommends using a Custom database software image and updating your database using that image.

After running precheck, you can identify if you have installed any additional One-Off updates by executing the following command in dbcli.

dbcli describe-job -i <job-id>

where <job-id> (dbcli list-jobs) is the job id of the precheck run.

All the changes in the Oracle home will be copied to the newly updated and installed database.


  • Oracle does not recommend changing any files within the database home.
  • It is essential to ensure that all the changes you made to your database home are copied correctly. If you have copied any files/folders in your database homes, like tnsnames.ora, listener.ora etc., you should back up those files manually.

The DB system should have access to the identity and object storage endpoints within Oracle Cloud Infrastructure. If the DB system running on a private subnet was only configured with a "Service Gateway" and no additional Gateway (e.g., NAT Gateway), you should ensure that the Service Gateway is set to allow the access to all OCI services and not just the object storage. No change is required if the identity and object storage endpoints can be reached by other means.

For more information on updating a DB system and list of currently available database updates, see Update a DB System. For more information on creating and working with software images, see Oracle Database Software Images.

Apply Interim (One-Off) Updates Using a Database Software Image

We do not recommend applying one-off updates to your bare metal and virtual machine DB systems instance. Instead, you should create and deploy a database software image that contains the necessary fixes. Only in cases where you cannot use a database software image, for example, to apply an interim update to a grid infrastructure home, you can file a Service Request (SR) and request support assistance to download a one-off update.

For more information on database software images, see Oracle Database Software Images.

Apply a Database Update

View the Database Update History

Apply Interim Updates


This topic applies only to database homes in 1-node and 2-node RAC DB systems.

To apply an interim update (previously known as a "one-off" patch) to fix a specific defect, follow the procedure in this section. Use the Opatch utility to apply an interim update to a database home.

Apply an Interim Update to a Database Home

Use the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use the following APIs to manage database updates.

  • ListDbHomePatches
  • ListDbHomePatchHistoryEntries
  • GetDbHomePatch
  • GetDbHomePatchHistoryEntry
  • UpdateDbHome
  • UpdateDatabase

For the complete list of APIs for the Database service, see Database Service API.