Manage Oracle Database Software Images

This article provides an overview of the database software image resource type, which you can use to create databases and Oracle Database homes, and to update databases.

Database software images give you the ability to create a customized Oracle Database software configuration that includes your chosen updates (PSU, RU or RUR), and optionally, a list of one-off (or interim) updates or an Oracle home inventory file. This reduces the time required to provision and configure your databases, and enables your organization to create an approved "gold image" for developers and database administrators.

Database software images are automatically stored in Oracle-managed Object Storage and can be viewed and managed in the Oracle Cloud Infrastructure (OCI) Console. Note that database software images incur Object Storage usage costs. Database software images are regional-level resources and can be accessed from any availability domain within their region. For more information, see Regions and Availability Domains.

Note:

Oracle Database 23c is currently not supported.

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.

Create Database Software Images

Database software images are resources within your tenancy that you create prior to provisioning or updating a DB system, database home, or database. There is no limit on the number of database software images you can create in your tenancy, and you can create your images with any Oracle Database software version and update supported on OCI.

Procedure

  1. Open the navigation menu. Select Oracle Database, then select Oracle Base Database.
  2. Under Resources, select Database software images.
  3. Click Create database software image.
  4. In the Display name field, provide a display name for your image. Avoid entering confidential information.
  5. Select your Compartment.
  6. In the Service, select Oracle Base Database Service. A custom database software image is compatible with only one service.
  7. Select the Database version for your image. You can create a database software image using any supported Oracle Database release update (RU).
  8. Select a software update in the Choose a patch set update, proactive bundle patch, or release update.
  9. Optionally, you can enter a comma-separated list of interim (one-off) update numbers.
  10. Optionally, you can upload an Oracle home inventory file from an existing Oracle Database. For instructions on creating an inventory file using OPatch, see Verify the Updates Applied to an Oracle Home.
  11. Click Show advanced options to add tags to your database software image. To apply a defined tag, you must have permission to use the tag namespace. For more information about tagging, see Resource Tags. If you are not sure if you must apply tags, skip this option (you can apply tags later) or ask your administrator.
  12. Click Create database software image.

Create Database Software Images from an Existing Database

You can create a database software image from a database in a DB system.

Procedure

  1. Open the navigation menu. Select Oracle Database, then select Oracle Base Database.
  2. Select your Compartment. A list of DB systems is displayed.
  3. In the list of DB systems, select the DB system that contains the database you want to use to create your software image.
  4. The details of the DB system followed by a list of databases are displayed.
  5. In the list of databases, select the name of the database that you want to use to create your software image.
  6. The details of the database are displayed.
  7. Click More actions, and then click Create image from database.
  8. In the Create database software image dialog, specify the following:
    • Display name: Provide a display name for your database software image.
    • Select a compartment: Optionally, you can select a different compartment from the one you are working in to store the database software image.
    • Click Create.

View Update Details of Database Software Images

You can view the Oracle Database version, update information (PSU/BP/RU level), and included one-off (interim) updates of a database software image.

Procedure

  1. Open the navigation menu. Select Oracle Database, then select Oracle Base Database.
  2. Under Resources, select Database software images.
  3. In the list of database software images, select the image you want to view.
  4. On the Database software image details page, the following details are displayed.
    • The Oracle Database version is displayed in the General Information section. For example, 19.0.0.0 .
    • The PSU/BP/RU field of the Update Information section displays the update level for the image. For example, 19.5.0.0 .
    • The One-Off Updates field displays the number of one-off updates included in the image, if any. The count includes all updates specified when creating the image (including updates listed in lsinventory). To view the included updates (if any are included), click the Copy All link and paste the list of included updates into a text editor. The copied list of update numbers is comma-separated and can be used to create additional database software images.

Delete Database Software Images

Perform the following steps to delete database software images.

Procedure

  1. Open the navigation menu. Select Oracle Database, then select Oracle Base Database.
  2. Under Resources, select Database software images.
  3. In the list of database software images, find the image you want to delete and click the Actions icon (three dots) at the end of the row.
  4. Click Delete.

Provision a Database Using a Database Software Image

After you create a database software image, you can use it to provision the initial database in a DB system.

For more information, see Create a DB System Using the Console.

Update a Database Using a Database Software Image

You can use a database software image to update the database of an existing DB system. This is sometimes referred to as an "in-place update". For information about using a custom database software image to update a database in a DB system, and to determine if a database has been updated with a particular database software image, see Update a Database.

For Oracle Data Guard associations, you can use a custom database software image for in-place updates on both the primary and standby database instances to ensure that both databases have the same updates.

Verify the Updates Applied to an Oracle Home

The OPatch utility enables you to apply and manage interim patches for your Oracle Database software. Using the lsinventory command provided by OPatch, you can create a file that lists the interim patches applied to an Oracle Database Home. This file can then be uploaded to the OCI Console during the creation of a custom database software image to add the exact set of patches used by the source database home to the list of patches included in the software image. You can find the OPatch utility in the $ORACLE_HOME/Opatch directory. The following example shows how to use the lsinventory command to create the lsinventory file.

ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2021, Oracle Corporation. All rights reserved.

Oracle Home : /u02/app/oracle/product/19.0.0.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/19.0.0.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.21
OUI version : 12.2.0.7.0
Log file location : /u02/app/oracle/product/19.0.0.0/dbhome_2/cfgtoollogs/opatch/opatch2021-01-21_09-22-45AM_1.log

Lsinventory Output file location : /u02/app/oracle/product/19.0.0.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2021-01-21_09-22-45AM.txt

Using 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.

  • CreateDatabaseSoftwareImage
  • ListDatabaseSoftwareImages
  • GetDatabaseSoftwareImage
  • DeleteDatabaseSoftwareImage
  • ChangeDatabaseSoftwareImageCompartment

Policy Details for Database Software Images

This topic provides the details for writing Oracle Cloud Infrastructure Identity and Access Management (IAM) policies to control access to database software images used by Base Database resources.

Resource-Types

The database-software-image resource-type covers the Oracle and custom database software images available through the database software image feature. The database-family aggregate resource-type covers the database software image resource-type as well as other resources related to Base Database instances. For more information, see Resource-Types in How Policies Work.

Aggregate Resource-Type

There are no aggregate resource-types for database software images.

Individual Resource-Types

  • database-software-image (covered under the database-family aggregate resource-type)

Supported Variables

Only the general variables are supported. For more information, see General Variables for All Requests in Policy Reference.

Details for Verb + Resource-Type Combinations

The following tables show the permissions and API operations covered by each verb. The level of access is cumulative as you go from inspect > read > use > manage. A plus sign (+) in a table cell indicates incremental access compared to the cell directly preceding it, whereas "no extra" indicates no incremental access.

Table - Details for verb + database-software-image combinations

Verbs Permissions APIs fully covered APIs partially covered
inspect DB_SOFTWARE_IMG_INSPECT

ListDatabaseSoftwareImages

GetDatabaseSoftwareImage

none
read no extra none none
use

READ +

DB_SOFTWARE_IMG_UPDATE

UpdateDatabaseSoftwareImage

ChangeDatabaseSoftwareImageCompartment

none
manage

USE +

DB_SOFTWARE_IMG_CREATE

DB_SOFTWARE_IMG_DELETE

CreateDatabaseSoftwareImage

DeleteDatabaseSoftwareImage

none

Permissions Required for Each API Operation

The following tables list the API operations for database software images in a logical order, grouped by resource type.

Database Software Image API Operations

Table - Database Software Image API Operations

API operation Permissions required to use the operation
ListDatabaseSoftwareImages DB_SOFTWARE_IMG_INSPECT
GetDatabaseSoftwareImage DB_SOFTWARE_IMG_INSPECT
UpdateDatabaseSoftwareImage DB_SOFTWARE_IMG_INSPECT and DB_SOFTWARE_IMG_UPDATE
ChangeDatabaseSoftwareImageCompartment DB_SOFTWARE_IMG_INSPECT and DB_SOFTWARE_IMG_UPDATE
CreateDatabaseSoftwareImage DB_SOFTWARE_IMG_INSPECT and DB_SOFTWARE_IMG_CREATE
DeleteDatabaseSoftwareImage DB_SOFTWARE_IMG_INSPECT and DB_SOFTWARE_IMG_DELETE
For more information about permissions and verbs, see Advanced Policy Features.