Applying Linux OS Security Patches by Using the dbaascli Utility
You can use the dbaascli
utility to apply Linux OS security patches to compute nodes associated with database deployments hosting a single-instance database or an Oracle Data Guard configuration of single-instance databases.
Topics
Using the dbaascli Utility on Deployments Hosting a Single-Instance Database
You can use the dbaascli
utility to apply Linux OS security patches to a compute node associated with a database deployment hosting a single-instance database.
Note:
Before you begin, review all steps in the procedure to understand how the compute node is rebooted at the end of the patching process.
-
Connect as the
opc
user to the compute node.See Connecting to a Compute Node Through Secure Shell (SSH).
-
Start a root-user command shell:
$ sudo -s #
-
Check whether any Linux OS security patches are available:
# dbaascli patch os list
This command is not yet available on Oracle Cloud at Customer. Instead, you must use the following command:
# /var/opt/oracle/patch/dbpatchmsm -list_ospatches
If the command response indicates that patches are available, continue at the next step.
Otherwise, the latest patches are already installed on the compute node, and you can exit the root-user command shell and disconnect from the compute node.
-
Apply the latest Linux OS security patches:
# dbaascli patch os apply
This command is not yet available on Oracle Cloud at Customer. Instead, you must use the following command:
# /var/opt/oracle/patch/dbpatchmsm -apply_ospatch_async
-
The
dbaascli
utility automatically reboots the compute node at the end of the patch installation, if necessary.If the utility does not reboot the compute node, then exit the root-user command shell and disconnect from the compute node.
Using the dbaascli Utility on Deployments Hosting an Oracle Data Guard Configuration of Single-Instance Databases
You can use the dbaascli
utility to apply Linux OS security patches to the two compute nodes associated with a database deployment hosting an Oracle Data Guard configuration of single-instance databases. This procedure uses the Data Guard switchover operation to reduce database downtime.
Note:
Before you begin, review all steps in the procedure to understand how the compute nodes are rebooted during the patching process.
-
Perform the following steps on the compute node hosting the standby database:
-
Connect as the
opc
user to the compute node.See Connecting to a Compute Node Through Secure Shell (SSH).
-
Start a root-user command shell:
$ sudo -s #
-
Check whether any Linux OS security patches are available:
# dbaascli patch os list
This command is not yet available on Oracle Cloud at Customer. Instead, you must use the following command:
# /var/opt/oracle/patch/dbpatchmsm -list_ospatches
If the command response indicates that patches are available, continue following this procedure.
Otherwise, the latest patches are already installed on the compute node. Exit the root-user command shell, disconnect from the compute node, and skip to Step 2 of this procedure.
-
Apply the latest Linux OS security patches:
# dbaascli patch os apply
This command is not yet available on Oracle Cloud at Customer. Instead, you must use the following command:
# /var/opt/oracle/patch/dbpatchmsm -apply_ospatch_async
-
Switch to the
oracle
user and shut down the database:# su - oracle $ sqlplus '/ as sysdba' ... SQL> shutdown ... SQL> exit
-
Return to being the root user and reboot the compute node:
$ exit # reboot ... The system is going down for reboot NOW!
-
After the compute node and standby database have rebooted, allow a few minutes for redo data to be applied to the standby database.
To monitor the progress, connect as the
opc
user to the standby compute node, and run the following command:$ dgmgrl show configuration verbose;
The operation is complete when the preceding command returns no errors.
-
-
Perform a switchover from the primary database to the standby database in your Oracle Data Guard configuration.
-
Perform step 1 on the compute node hosting the new standby database (this was the primary database before you performed the switchover).
-
Perform a switchover back to the original primary database in your Oracle Data Guard configuration.