Subscribe YouTube Channel For More Live Tutorials
Oracle Exadata Patching Easy Way
Exadata Patching Overview and Patch Testing Guidelines
Exadata Database Machine is a complete, integrated system that contains both hardware and software for running Oracle Database. The purpose of this article is provide guidelines for testing and applying patches on Exadata Database Machine and to describe the different types of patches that are required to maintain Exadata Database Machine.
Patching an Exadata Cloud Service Instance Manually
This topic explains how to use the dbaascli
utility to perform patching operations for Oracle Grid Infrastructure and Oracle Database on an Exadata Cloud Service instance. The utility requires root or sudo administration privileges.
Exadata Patching & Upgrades
Resources and References Resources and References
• Latest Exadata software (Note 888828 1) Latest Exadata software (Note 888828.1)
• Exadata Testing and Patching Practices (Note 1262380.1)
• Exadata Healthcheck (Note 1070954.1)
• Data Guard Standby-First Patch App y ( ) l Note 1265700.1)
• Enterprise Manager Patch Apply (Note 1265998.1)
• Patch READMEs.
Patch Installation Methods
• Exadata Storage Server software
• Rolling patch apply
• Non-rolling patch apply
• Database Server Oracle software Database Server Oracle software
• RAC Rolling Installable
• OPatch Automation
• Enterprise Manager Installable
• Data Guard Standby-First Installable
Patch Installation and Testing Guidelines
1. Review patch documentation
• README and referenced Support Notes
2. Validate in test environment
•Verify patch installation (HealthCheckNote 1070954.1)
• Verify functionality and performance
• Automate
• Define and test fallback plans
3. Apply in production environment
• Data Guard Standby Data Guard Standby
-First Patch Apply First Patch Apply
• Monitor for regressions
Support Note 1262380.1
Managing Patches
To list available patches
You can produce a list of available patches using the patch db list
subcommand of the dbaascli
utility:
-
Connect to the compute node as the
opc
user. -
Start a root-user command shell:
$ sudo -s #
-
Execute the following command:
# dbaascli patch db list --oh <hostname>:<oracle_home>
where:
--oh
specifies a compute node and Oracle home directory for which you want to list the available patches. In this context, an Oracle home directory may be an Oracle Database Home directory or the Oracle Grid Infrastructure home directory.
Example (Oracle Database):
# dbaascli patch db list --oh exacs-node1:/u02/app/oracle/product/18.0.0.0/dbhome_1 DBAAS CLI version 18.2.3.2.0 Executing command patch db list --oh exacs-node1:/u02/app/oracle/product/18.0.0.0/dbhome_1 INFO : EXACS patching Available Patches patchid :29708703 (Database Release Update : 18.7.0.0.190716 (Jul 2019)) Install database patch using dbaascli patch db apply --patchid 29708703 (Database Release Update : 18.7.0.0.190716 (Jul 2019)) --dbnames <>
Example (Oracle Grid Infrastructure):
# dbaascli patch db list --oh exacs-node1:/u01/app/18.1.0.0/grid
Note
The list of available patches is determined by interrogating the database to establish the patches that have already been applied. When a patch is applied, the corresponding database entry is made as part of the SQL patching operation, which is executed at the end of the patch workflow. Therefore, the list of available patches may include partially applied patches along with patches that are currently being applied.
To learn more about the
patch db list
subcommand, including available options, execute the following command:# dbaascli patch db list ?
-
Exit the root-user command shell.
# exit $
To check prerequisites before applying a patch
You can perform the prerequisites-checking operation using the patch db prereq
subcommand of the dbaascli
utility:
-
Connect to the compute node as the
opc
user. -
Start a root-user command shell:
$ sudo -s #
- Execute the following command:
# dbaascli patch db prereq --patchid <patchid> --dbnames <dbname>
where:
--patchid
identifies the patch to be pre-checked.--dbnames
specifies the name of the database you want to pre-check.
Example (Oracle Database):
# dbaascli patch db prereq --patchid 29708703 --dbnames DB18
Example (Oracle Grid Infrastructure):
# dbaascli patch db prereq --patchid 29708703-GI --dbnames GRID
To run the command in the background, append an ampersand (&):
# dbaascli patch db prereq --patchid 29708703 --dbnames DB18 &
To learn more about the
patch db prereq
subcommand, including available options, execute the following command:# dbaascli patch db prereq ?
-
Exit the root-user command shell:
# exit $
To apply a patch
You can apply a patch by using the patch db apply
subcommand of the dbaascli
utility.
The patching operation:
-
Can be used to patch some or all of your compute nodes using one command.
-
Coordinates multi-node patching in a rolling manner.
-
Can execute patch-related SQL after patching all the compute nodes in the cluster.
To perform the patching operation:
-
Connect to the compute node as the
opc
user. -
Start a root-user command shell:
$ sudo -s #
- Execute the following command:
# dbaascli patch db apply --patchid <patchid> --dbnames <dbname> --run_datasql 1
where:
--patchid
identifies the patch to be applied.--dbnames
specifies the name of the database you want to apply the patch to.-
--run_datasql 1
instructs the command to execute patch-related SQL commands.Note
- Patch-related SQL should only be executed after all of the compute nodes are patched. Therefore, take care not to specify this argument if you are patching a subset of nodes and further nodes remain to be patched.
- This argument can only be specified in conjunction with a patching operation on a set of compute nodes. Therefore, if you have patched all of your nodes and you did not specify this argument, you will need to manually execute the SQL commands associated with the patch. Refer to the patch documentation for further details.
Example (Oracle Database):
# dbaascli patch db apply --patchid 29708703 --dbnames DB18
Example (Oracle Grid Infrastructure):
# dbaascli patch db apply --patchid 29708703-GI --dbnames grid
To run the command in the background, append an ampersand (&):
# dbaascli patch db apply --patchid 29708703 --dbnames DB18 &
To learn more about the
patch db apply
subcommand, including available options, execute the following command:# dbaascli patch db apply ?
-
Exit the root-user command shell:
# exit $
To list applied patches
You can produce a list of applied patches to determine which patches have been applied.
You can use the opatch
utility to determine the patches that have been applied to an Oracle Database or Grid Infrastructure installation.
To produce a list of applied patches for an Oracle Database installation:
-
Connect to a compute node as the
oracle
user. -
Go to the Oracle user's home directory:
$ cd
-
Ensure that you are in the Oracle user's home directory:
$ pwd /home/oracle
-
Source the environment file.
Example (using the environment file for a database named "DB18"):
$ . DB18.env
-
Execute the
opatch
command with thelspatches
option:$ opatch lspatches
To produce a list of applied patches for Oracle Grid Infrastructure:
-
Connect to a compute node as the
opc
user. -
Become the
grid
user:$ sudo -s # su - grid
-
Execute the
opatch
command with thelspatches
option:$ opatch lspatches
To roll back a patch
You can roll back a patch by using the dbaascli
utility's patch switchback
operation. This operation:
-
Can be used to roll back a patch on some or all of your compute nodes using one command.
-
Coordinates multi-node operations in a rolling manner.
-
Can execute rollback-related SQL after rolling back the patch on all the compute nodes in the cluster.
To perform a patch switchback (roll back) operation:
-
Connect to the compute node as the
opc
user. -
Start a root-user command shell:
$ sudo -s #
-
Execute the following command:
# dbaascli patch db switchback --patchid <patchid> --instance1 <hostname>:<oracle_home> --dbnames <dbname> --run_datasql 1
where:
--patchid
identifies the patch to be rolled back.--instanceN
specifies a compute node and one or more Oracle home directories that are subject to the rollback operation. In this context, an Oracle home directory may be an Oracle Database home directory or the Oracle Grid Infrastructure home directory.--dbnames
specifies the name of the database you want to apply the switchback operation to.-
--run_datasql 1
instructs the command to execute rollback-related SQL commands.Note
- Rollback-related SQL should only be executed after all of the compute nodes are rolled back. Therefore, take care not to specify this argument if you are rolling back a subset of nodes and further nodes remain to be rolled back.
- This argument can only be specified in conjunction with a rollback operation on a set of compute nodes. Therefore, if you have rolled back all of your nodes and you did not specify this argument, you will need to manually execute the SQL commands associated with the rollback operation. Refer to the patch documentation for further details.
Example (Oracle Database):
# dbaascli patch db switchback --patchid 29708703 --dbnames DB18
Example (Oracle Grid Infrastructure):
# dbaascli patch db switchback --patchid 29708703-GI --dbnames grid
To run the command in the background, append an ampersand (&):
# dbaascli patch db switchback --patchid 29708703 --dbnames DB18 &
To learn more about the
patch db switchback
subcommand, including available options, execute the following command:# dbaascli patch db switchback ?
-
Exit the root-user command shell:
# exit $