Update a Database Home
This topic provides the details and procedure to update a Database Home.
Before you begin, review the following:
- During an update, lifecycle operations on the VM Cluster and its resources are temporarily unavailable.
- The precheck does not affect the availability of the Database Home, and all resources remain operational.
- Oracle recommends that you run the precheck operation for an update before applying it.
- Updates are applied to the Database Home in a rolling manner, one node at a time.
- During the update, each database in the Database Home is stopped and restarted. This process might result in temporary service disruption.
- For Oracle AI Database, updates are available for the four most recent versions, N through N-3. For example, if an instance uses 19c and the latest available 19c version is 19.10.0.0, then 19.10.0.0, 19.9.0.0, 19.8.0.0, and 19.7.0.0 are available for Oracle AI Database updates. You can use any of these updates, but Oracle recommends that you use the latest update.
Prerequisites
- The
/u01directory on the database host file system has at least 15 GB of free space for update processes. - Oracle Clusterware is up and running on the VM Cluster.
- All nodes of the VM Cluster are up and running.
You can update the Database Home:
Using the Console
Perform the following steps in the Console.
-
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.
- On the Data Infrastructure details page, select the VM Cluster tab to view the list of all VM Clusters.
- On the VM Clusters tab, select the VM Cluster that you want to work with.
-
On the VM Cluster details page, select the Database Homes tab to view the list of all Database Homes.
-
On the Database Homes tab, select the Database Home that you want to work with.
-
On the Database Home details page, select the Updates tab.
-
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.
-
-
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.
- Datapatch options: Select one of the following datapatch options.
- Select Apply to apply the selected update.
- Advanced options: Expand to provide additional details.
- 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.
-
Patching an Oracle home (in-place patching). This updates all databases located in the Oracle home.
-
Moving a database to a different Oracle home that has the required Oracle AI Database software version (out-of-place patching).
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:
-
You can update all of your database nodes or a subset of nodes.
-
Multi-node patching takes place in a rolling fashion.
-
Optionally, you can perform a software-only update operation. Then, when you are ready, you can run
datapatchto perform post-patch SQL actions. -
You can update an Oracle home containing one or more databases.
To update an Oracle Home (dbhome):
-
Connect to the virtual machine as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a
rootuser command shell:sudo -s -
Run the following command:
dbaascli dbhome patch --oracleHome dbhome_path --targetVersion Oracle_Database_versionParameters:
Parameter Description --oracleHomeidentifies the path of the Oracle home to be patched. --targetVersionspecifies 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 -
Exit the
rootuser command shell:exitFor 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:
-
Connect to the virtual machine as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a
rootuser command shell:sudo -s -
Run the following command:
dbaascli database move --oracleHome path_to_target_oracle_home --dbname database_nameParameters:
Parameter Description --oracleHomeidentifies 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 movecommand.--dbnamespecifies 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 -
Exit the
rootuser command shell:exitFor 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.
-
Connect to the virtual machine as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a
rootuser command shell:sudo -s -
Run the following command:
dbaascli dbhome patch --oracleHome dbhome_path --targetVersion Oracle_Database_version --executePrereqsParameters:
Parameter Description --oracleHomeidentifies the path of the Oracle home to be prechecked. --targetVersionspecifies 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). -
Exit the
rootuser command shell:exit
Precheck for Database Move Patching (Out-of-Place Patching)
Use the --executePrereqs flag with the dbaascli database move command.
-
Connect to the virtual machine as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a
rootuser command shell:sudo -s -
Run the following command:
dbaascli database move --oracleHome path_to_target_oracle_home --dbname database_name --executePrereqsParameters:
Parameter Description --oracleHomeidentifies 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 movecommand.--dbnamespecifies the name of the database that is being moved -
Exit the
rootuser 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.
-
Connect to the virtual machine as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a
rootuser command shell:sudo -s -
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 -
Exit the
rootuser command shell:exit
Rolling Back a Patch Operation
Use the --rollback flag with the original patching command to roll back (revert) a patching operation.
-
Connect to the virtual machine as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a
rootuser command shell:sudo -s -
Run the original patching command to roll back (revert) a patching operation:
For example:
dbaascli grid patch --targetVersion 19.11.0.0.0 --rollbackNote:
- 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
--resumeor--rollbackflag.
-
Exit the
rootuser command shell:exit