Wednesday, 18 February 2026

How to check/apply patches in OCI DB System (Base Database/DB System)


 You cannot apply an RU until it is published for your database in the OCI Console. Manual patching is not supported and recommended in Base Database Service

Oracle releases RUs quarterly. For Oracle Base Database (OCI managed), there is a standard qualification lag before an RU appears in the Console; you cannot manually apply it before Oracle publishes it for your db system

Best practices to apply patch to minimize downtime

On production Environment

1) apply patch on GI on standby database if applicable 

2) perform switchover and apply patch on GI on new standby

3) apply patch on db home on standby database

4) perform switchover and apply patch on db home on new standby

5) complete validation


- How to check/apply patches in OCI (Base Database/DB System)

- Use the OCI Console:

- For DB Systems (Grid Infrastructure / Database): docs.oracle.com/en/cloud/paas/base-database/update-dbs/

- For Database homes/databases: docs.oracle.com/en/cloud/paas/base-database/update-db/

- In the Console, navigate to your database or DB system, open the Patching/Updates page,

   review the Available updates, and schedule/apply the RU when the desired version is listed.


Precautions for any patch activity

------------------------------------------------------ 

Patch first in non-production, verify backups/restore, schedule a maintenance window, and review the patch README. Ensure datapatch completes successfully and validate with DBA_REGISTRY_SQLPATCH.

It's strongly recommended to test it non-production environment before implementing on the production database This helps minimize the risk of disruptions, system crashes, and security issues that can arise from untested patches. 


Patch validation

From root user

/opt/oracle/dcs/bin/dbcli describe-component

/opt/oracle/dcs/bin/dbcli   describe-latestpatch

sudo su - grid

$ORACLE_HOME/OPatch/opatch lspatches

$ORACLE_HOME/bin/kfod op=patchlvl

sudo su - oracle

$ORACLE_HOME/OPatch/opatch lspatches

$ORACLE_HOME/bin/kfod op=patchlvl


Output of the following

       - for the CDB:

sqlplus / as sysdba

set markup html on

spool /tmp/CDB.html

show con_name;

show pdbs;

select dbid,name,db_unique_name,open_mode,database_role,switchover_status from v$database;

select comp_id, comp_name, version, status, schema from dba_registry order by status;

select * from dba_registry_sqlpatch order by action_time;

select * from dba_objects where status='INVALID';

select * from v$option order by parameter;

select * from pdb_plug_in_violations;

select message from pdb_plug_in_violations where type like '%ERR%' and status <> 'RESOLVED';

col action_time for a28

col action for a10

col version for a8

col comments for a30

col status for a10

set line 999 pages 999

select patch_id, patch_type,source_version, target_version, status, Action,Action_time from dba_registry_sqlpatch order by action_time;

 

set pages 999

set pagesize 999

 select i.instance_name,

       i.version "Inst Version",

       to_char(h.action_time, 'DD-MON-YYYY HH24:MI:SS') as when,

       h.action,

       h.namespace,

       h.version "Patch Version",

       h.id,

       h.comments,

       h.bundle_series

from   sys.registry$history h,

       v$instance i

order  by h.action_time; 

       spool off

       

       - for the PDB:

       set markup html on

       spool /tmp/PDB.html

       show con_name;

       select comp_id, comp_name, version, status, schema from dba_registry order by status;

       select * from dba_registry_sqlpatch order by action_time;

       select * from dba_objects where status='INVALID';

       select * from v$option;

       spool off




No comments:

Post a Comment