Update a Database Home

This topic provides the details and procedure to update a Database Home.

Before you begin, review the following:

Prerequisites

You can update the Database Home:

Using the Console

Perform the following steps in the Console.

  1. On the Data Infrastructures list page, select the Data Infrastructure that you want to work with. If you need help finding the list page or the Data Infrastructure, see List Data Infrastructures.

  2. On the Data Infrastructure details page, select the VM Cluster tab to view the list of all VM Clusters.
  3. On the VM Clusters tab, select the VM Cluster that you want to work with.
  4. On the VM Cluster details page, select the Database Homes tab to view the list of all Database Homes.

  5. On the Database Homes tab, select the Database Home that you want to work with.

  6. On the Database Home details page, select the Updates tab.

  7. Review the list of available updates for the Database Home.

    • Use the Compartment filter to specify the compartment that contains the Software Image.

    • Use the Type filter to specify the type of Software Image.

      • Oracle-published images are generally available Oracle Software Images that you can use to update the Database Home.

      • Custom images are database Software Images that you created in advance.

    • Use the Region filter to access the Software Images created in a different region.

  8. From the Actions menu for the update you are interested in, select one of the following actions:

    • Precheck: Checks for any prerequisites to ensure that the update can be applied successfully.
    • Apply Database Home update: Opens the Apply Database Home update panel. In the panel, provide the following details.
      • Advanced options: Expand to provide additional details.
        • Datapatch options: Select one of the following datapatch options.
          • Run datapatch on the databases: Applies the datapatch operation to all databases that run from the Database Home being updated. This is the default option.
          • Skip datapatch on the databases: Skips datapatch execution on all databases that run from the Database Home being updated.
          • Skip datapatch for closed PDBs only: Skips datapatch only for Pluggable Databases that are in a closed state during the update.
      • Select Apply to apply the selected update.
    • Copy OCID: Copies the OCID to the clipboard.

The list of available updates displays the state of the operation. While the precheck is running, the update status shows Checking. While an update is being applied, the update status shows Applying, and the Database Home and database statuses show Updating. If the update completes successfully, the update status changes to Applied, and the Database Home and database statuses change to Available. You can view more details about an individual update operation in Update History.

Using dbaascli Utility

Using dbaascli, you can select to update a database by patching Oracle home, or by moving the database to an Oracle home with the required update level.

Update a Database Home (In-Place Database Patching)

To update an Oracle home, use the dbaascli dbHome patch command.

This will update all databases running in the specified home, and the databases will remain in the home after the patching is complete. The following apply to using the dbHome patch command for in-place patching operations:

To update an Oracle Home (dbhome):

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the following command:

    dbaascli dbhome patch --oracleHome dbhome_path --targetVersion Oracle_Database_version

    Parameters:

    Parameter Description
    --oracleHome identifies the path of the Oracle home to be patched.
    --targetVersion specifies the target Oracle AI Database version to use for patching, specified as five numeric segments separated by periods (e.g. 19.12.0.0.0).

    For example:

    dbaascli dbhome patch --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --targetVersion 19.9.0.0.0
  4. Exit the root user command shell:

    exit

    For more details on advanced supported options, see dbaascli dbHome patch.

Moving a Database to a Different Oracle Home (Out-of-Place Patching)

To update an Oracle AI Database by moving it to an Oracle home that is already at the required update level, use the dbaascli database move command.

After the database move operation is complete, the database runs using the Oracle AI Database software version of the target Oracle home.

To update a database by moving it to a different Oracle Home:

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the following command:

    dbaascli database move --oracleHome path_to_target_oracle_home --dbname database_name

    Parameters:

    Parameter Description
    --oracleHome identifies the path of the target Oracle home that uses the required Oracle AI Database software version. Note that the target Oracle home must exist in your system prior to using the database move command.
    --dbname specifies the name of the database that is being moved.

    For example:

    dbaascli database move --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --dbname xyz
  4. Exit the root user command shell:

    exit

    For more details on advanced supported options, see dbaascli database move.

Performing a Precheck Before Patching Databases and Grid Infrastructure

You can perform a prerequisites-checking operation (also called a “precheck”) for the commands in this topic using the applicable precheck flag.

Running prechecks allows you to run only the precheck portion of the patching operation without performing actual patching. Oracle recommends running prechecks to discover software issues that could prevent successful patching.

To perform patching prechecks, first, connect to a virtual machine in your Oracle Base Database Cloud@Customer instance as the root user.

Precheck for Oracle Home Patching (In-Place Patching)

Use the --executePrereqs flag with the dbaascli dbhome patch command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the following command:

    dbaascli dbhome patch --oracleHome dbhome_path --targetVersion Oracle_Database_version --executePrereqs

    Parameters:

    Parameter Description
    --oracleHome identifies the path of the Oracle home to be prechecked.
    --targetVersion specifies the target Oracle AI Database version to be patched to, specified as five numeric segments separated by periods (e.g. 19.12.0.0.0).
  4. Exit the root user command shell:

    exit

Precheck for Database Move Patching (Out-of-Place Patching)

Use the --executePrereqs flag with the dbaascli database move command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the following command:

    dbaascli database move --oracleHome path_to_target_oracle_home --dbname database_name --executePrereqs

    Parameters:

    Parameter Description
    --oracleHome identifies the path of the target Oracle home that uses the required Oracle AI Database software version. Note that the target Oracle home must exist in your system prior to using the database move command.
    --dbname specifies the name of the database that is being moved
  4. Exit the root user command shell:

    exit

Resuming or Rolling Back a Patching Operation

You can resume or revert a failed patching operation. Reverting a patch is known as a rollback.

Resuming a Patch Operation

To resume a patching operation, use the --resume flag with the original patching command.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the original patching command to resume a patching operation:

    For example:

    dbaascli dbhome patch --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_2 --targetVersion 19.9.0.0.0 --resume
  4. Exit the root user command shell:

    exit

Rolling Back a Patch Operation

Use the --rollback flag with the original patching command to roll back (revert) a patching operation.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the original patching command to roll back (revert) a patching operation:

    For example:

    dbaascli grid patch --targetVersion 19.11.0.0.0 --rollback

    Note:

    • Resume and Rollback operations are supported for Oracle home patching, Oracle Grid Infrastructure patching, and database move operations.
    • When resuming or rolling back a patching operation, you must run the resume or rollback command from the same node that was used to run the original patching command, and you must run the original command with the addition of the --resume or --rollback flag.
  4. Exit the root user command shell:

    exit