Saturday, 12 April 2025

Update the Operating System of a DB System in Oracle Cloud Infrastructure (OCI) using DBCLI Command Step By Step

 

Update the Operating System of a DB System in Oracle Cloud Infrastructure (OCI) using DBCLI Command


 

In this Article, we will discuss about how to update the Operating System of Two node DB System in Oracle Cloud Infrastructure (OCI) using DBCLI Command in Rolling Fashion (One by One)

The current configuration is Two Node DB System

EASYDB1 And EASYDB2

Note:

1)    Some OS update operations require a reboot after update is complete. Use the dbcli get-availableospatches Command to confirm it

2)    You can use the -l (--local) flag to update the server components only in the current node(One By One):

3)    Oracle recommends rebooting the DB system if any kernel update is present in OS update.

4)    Oracle does not recommend installing OS packages or dependencies that are not part of the version lock that Oracle provides

 

Prerequisites

 

  • Back up the database in the DB system prior to attempting an OS update.
  • Do not remove packages from a DB system. However, you might have to remove custom RPMs (packages that were installed after the system was provisioned) for the update to complete successfully.
  • Oracle recommends that you test any updates thoroughly on a non-production system before updating a production system.

 

Apply OS Patch on EASYDB1(Node1)

 

Login DB System using Root User

1)     check installed update versions a

Sudo su –

Cd /opt/oracle/dcs/bin/dbcli

dbcli describe-component

2)     Check system status before patching

dbcli describe-system

3)     identify updates you want to apply to the OS.

Note that if the rebootIsRequired field is "true", you must reboot the DB system

dbcli get-availableospatches

4)     to get the output in JSON, use the following command.

dbcli get-availableospatches -j

5)    run a precheck on Node1


dbcli update-server -c os -p -l

6)    Check job details.

dbcli describe-job -i <Job_id>

If the precheck is successful and uncovers no issues that prevent a successful update operation, you can update the OS. If the precheck is not successful, address the issues identified by the precheck before trying to update the OS.

 

Note:

You can use the -l (--local) flag to update the server components only in the current node.


7) update the OS on Node1

dbcli update-server -c os -l


Note:
You can use the -l (--local) flag to update the server components only in the current node.

Note:

f the OS update requires a reboot, reboot the server after the update operation is complete.

 

Verification

dbcli describe-component

dbcli describe-system

crsctl stat res -t

Ensure:

- All resources are ONLINE

- System status is Ready

- No failed components

 

 

Apply OS Patch on EASYDB2(Node2)

 

1) Check system status before patching

dbcli describe-system

 

 pre-check and Apply OS Patch as Node2 and do verification as we have done for node1.

2) Node wise pre check

dbcli update-server -c os -p -l

 

3) Node wise Os patch apply

dbcli update-server -c os -l

 

After Node 2 Reboots, Validate

 

 Verify patch success on Node2 as below

dbcli describe-component

dbcli describe-system

crsctl stat res -t

Optional: Verify Kernel Version After Patching (Both Nodes)

 

uname -r

You should see an updated kernel version (if a new UEK patch was applied).

Please refer below for more Details

https://docs.oracle.com/en/cloud/paas/base-database/cli-reference/index.html#GUID-1B083322-AAE3-47AB-A5E6-FF19EA81D8B3

https://docs.oracle.com/en/cloud/paas/base-database/update-dbcli/index.html#GUID-2E59FE04-7716-4A66-B6F1-9AA622CDD33C

https://docs.oracle.com/en/cloud/paas/base-database/cli-reference/index.html#GUID-A6FA643C-99E2-4CCD-B376-A0D4CC508C4B

https://docs.oracle.com/en/cloud/paas/base-database/update-dbcli/#articletitle