Thursday, May 21, 2026

Oracle Standby FIX using RMAN Incremental Backup from Primary DB

 

When you don’t have an option other than doing incremental backup from Primary DB (when ARCH logs are gone from all places) below is the high-level DB steps to fix the Standby GAP

On Standby:

Get the current DB SCN number

SYS@myoradb> select to_char (current_scn) from v$database;
TO_CHAR(CURRENT_SCN)
---------------------------------
11411445224862      à  SCN to take Backup from
  
  1. [Standby] Stop the managed standby apply process:
  2. Shut down standby
  3. start RMAN incremental backup from source (primary OR standby)
    RMAN> Backup as compressed backupset incremental from scn 11411445224862 database format '/u01/app/oracle/RMAN_INC/ForStandby_%U' tag 'FORSTANDBY';
  4. backup control file from source
    backup current controlfile for standby format '/u01/app/oracle/RMAN_INC/TRGDB_ForStandbyCTRL.bck';
  5. SCP backup pieces to Standby Server
    oracle@SRCHOST testdb > nohup scp TRGHOST:/u01/app/oracle/RMAN_INC/ForStandby_6091 . > Nohup_6091.log &
  6. [on standby] shut down DB and copy standby control file to location specified in standby
    • Backup existing control file and replace with primary control file
  7. mount standby DB from only 1 NODE
    RMAN> alter database mount;

       8 . Catalog all backup files with RMAN and start recover
             RMAN> catalog start with '/u01/app/oracle/TESTDB_standby_';
             RMAN> recover database;

             SYS@myoradb> select thread#, low_sequence#, high_sequence# from v$archive_gap;

 


Apply RU patch "37257886" for 19c CDB

 
 
Server : srchost.domain.com (NON-RAC)
Databases : oradb001 & oradb002 (Containers)
DB home : /u01/app/rdbms/product/19000LDB1 (19.18)
Going from 19.18  à 19.26 both Grid and RDBMS
 
Before Patch Info
Get pre-cheks for DB’s like registry, invalid, opatch info,etc
 
OPATCH Version update (check and Upgrade if needed)
 
You must use the OPatch utility version 12.2.0.1.46 or later to apply this patch.
 
Download and update OPATCH version for both Oracle and Grid Homes OPATCH
 
[root@srchost july_2025]# cd /u01/app/grid/product/19000LGR1
[root@srchost 19000LGR1]# mv OPatch OPatch_BK
[root@srchost 19000LGR1]# ls -ld OPatch_BK/
drwxr-x--- 15 oracle oinstall 4096 Dec 23 2024 OPatch_BK/
 
[root@srchost 19000LGR1]# unzip /u01/app/patch/PSU/p6880880_190000_Linux-x86-64.zip
 
[root@srchost 19000LGR1]# /u01/app/grid/product/19000LGR1/OPatch/opatch -version
The user is root. OPatch cannot continue if the user is root.
 
OPatch failed with error code 255
 
[root@srchost 19000LGR1]# ls -l /u01/app/grid/product/19000LGR1/OPatch/opatch
-rwxr-x--- 1 root root 50894 Oct 7 15:11 /u01/app/grid/product/19000LGR1/OPatch/opatch
 
[root@srchost 19000LGR1]# chown -R oracle:oinstall OPatch
 
[root@srchost 19000LGR1]# ls -l /u01/app/grid/product/19000LGR1/OPatch/opatch
-rwxr-x--- 1 oracle oinstall 50894 Oct 7 15:11 /u01/app/grid/product/19000LGR1/OPatch/opatch
 
[oracle@srchost PSU]$ cd /u01/app/rdbms/product/19000LDB1
[oracle@srchost 19000LDB1]$ mv OPatch OPatch_BK
[oracle@srchost 19000LDB1]$ unzip /u01/app/patch/PSU/p6880880_190000_Linux-x86-64.zip
 
 
GRID_HOME Check
 
[root@srchost OPatch]# /u01/app/grid/product/19000LGR1/OPatch/opatch version
OPatch Version: 12.2.0.1.48
 
OPatch succeeded.
 
 
DB HOME Check
[oracle@srchost PSU]$ cd /u01/app/rdbms/product/19000LDB1
[oracle@srchost 19000LDB1]$ cd OPatch
[oracle@srchost OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.45
 
OPatch succeeded.
 
 
System Space Check
Download patch from to the server and create/update the below file to check if enough free space is available in the Grid home
 
Run the OPatch command to check if enough free space is available in the Grid home:
 
[oracle@srchost 37257886]$ cat /u01/app/patch/patch_list_gihome.txt
/u01/app/patch/PSU/37257886/36758186
/u01/app/patch/PSU/37257886/37260974
/u01/app/patch/PSU/37257886/37266638
/u01/app/patch/PSU/37257886/37268031
/u01/app/patch/PSU/37257886/37461387
 
Run the OPatch command to check if enough free space is available in the Oracle home:
 
[oracle@srchost 37257886]$ cat /u01/app/patch/patch_list_dbhome.txt
/u01/app/patch/PSU/37257886/37260974
/u01/app/patch/PSU/37257886/37268031
 
 
 
[oracle@srchost 37257886]$ /u01/app/rdbms/product/19000LDB1/OPatch//opatch prereq CheckSystemSpace -phBaseFile /u01/app/patch/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/rdbms/product/19000LDB1
Central Inventory : /u01/app/oraInventory
from : /u01/app/rdbms/product/19000LDB1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/rdbms/product/19000LDB1/cfgtoollogs/opatch/opatch2025-06-04_15-45-34PM_1.log
 
Invoking prereq "checksystemspace"
 
Prereq "checkSystemSpace" passed.
 
OPatch succeeded.
 
[oracle@srchost 37257886]$ /u01/app/grid/product/19000LGR1/OPatch//opatch prereq CheckSystemSpace -phBaseFile /u01/app/patch/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/grid/product/19000LGR1
Central Inventory : /u01/app/oraInventory
from : /u01/app/grid/product/19000LGR1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/product/19000LGR1/cfgtoollogs/opatch/opatch2025-06-04_15-44-37PM_1.log
 
Invoking prereq "checksystemspace"
 
Prereq "checkSystemSpace" passed.
 
OPatch succeeded.
[oracle@srchost 37257886]$
 
 
Check Patch Conflicts for all patches
 
[oracle@srchost 36758186]$ /u01/app/grid/product/19000LGR1/OPatch//opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/app/patch/PSU/37257886/36758186
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/grid/product/19000LGR1
Central Inventory : /u01/app/oraInventory
from : /u01/app/grid/product/19000LGR1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/product/19000LGR1/cfgtoollogs/opatch/opatch2025-06-04_15-04-54PM_1.log
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
[oracle@srchost 36758186]$ /u01/app/grid/product/19000LGR1/OPatch//opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/app/patch/PSU/37257886/37260974
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/grid/product/19000LGR1
Central Inventory : /u01/app/oraInventory
from : /u01/app/grid/product/19000LGR1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/product/19000LGR1/cfgtoollogs/opatch/opatch2025-06-04_15-07-01PM_1.log
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
[oracle@srchost 36758186]$ /u01/app/grid/product/19000LGR1/OPatch//opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/app/patch/PSU/37257886/37268031
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/grid/product/19000LGR1
Central Inventory : /u01/app/oraInventory
from : /u01/app/grid/product/19000LGR1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/product/19000LGR1/cfgtoollogs/opatch/opatch2025-06-04_15-08-25PM_1.log
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
[oracle@srchost 37257886]$ /u01/app/grid/product/19000LGR1/OPatch//opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/app/patch/PSU/37257886/37266638
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/rdbms/product/19000LDB1
Central Inventory : /u01/app/oraInventory
from : /u01/app/rdbms/product/19000LDB1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/rdbms/product/19000LDB1/cfgtoollogs/opatch/opatch2025-06-04_15-08-00PM_1.log
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
[oracle@srchost 37257886]$ /u01/app/grid/product/19000LGR1/OPatch//opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/app/patch/PSU/37257886/37461387
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2025, Oracle Corporation. All rights reserved.
 
PREREQ session
 
Oracle Home : /u01/app/rdbms/product/19000LDB1
Central Inventory : /u01/app/oraInventory
from : /u01/app/rdbms/product/19000LDB1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/rdbms/product/19000LDB1/cfgtoollogs/opatch/opatch2025-06-04_15-08-36PM_1.log
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
 
 
Backup HOME
How to Perform ORACLE_HOME Backup? (Doc ID 565017.1)
 
[oracle@srchost 37257886]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
 
 
[oracle@srchost 37257886]$ ps -ef | grep tns
root 6 2 0 2023 ? 00:00:00 [netns]
oracle 35889 1 0 2023 ? 00:24:33 /u01/app/grid/product/19000LGR1/bin/tnslsnr LISTENER -no_crs_notify -inherit
oracle 4177635 3979331 0 17:36 pts/2 00:00:00 grep --color=auto tns
[oracle@srchost 37257886]$
 
[oracle@srchost patch]$ tar -czvf /u01/app/patch/Backup_OraInv.tar.gz /u01/app/oraInventory
 
[oracle@srchost patch]$ ls -lrth
total 3.6G
drwxr-xr-x 2 oracle oinstall 4.0K Mar 10 15:28 OPATCH
-rwxrwxr-x 1 oracle oinstall 3.6G May 30 13:03 jan_2025.tar
drwxr-xr-x 3 oracle oinstall 4.0K Jun 4 14:04 PSU
-rw-r--r-- 1 oracle oinstall 185 Jun 4 15:39 patch_list_gihome.txt
-rw-r--r-- 1 oracle oinstall 74 Jun 4 15:44 patch_list_dbhome.txt
-rw-r--r-- 1 oracle oinstall 1.4M Jun 5 07:01 Backup_OraInv.tar.gz
 
[oracle@srchost dump]$ ps -ef |grep tns
root 6 2 0 2023 ? 00:00:00 [netns]
oracle 35889 1 0 2023 ? 00:24:35 /u01/app/grid/product/19000LGR1/bin/tnslsnr LISTENER -no_crs_notify -inherit
oracle 690789 3997984 0 07:17 pts/3 00:00:00 grep --color=auto tns
 
 
[root@srchost ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /u01/app/oracle
[root@srchost ~]# lsnrctl status
 
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 05-JUN-2025 07:17:46
 
Copyright (c) 1991, 2023, Oracle. All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=srchost.domain.com)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 18-SEP-2023 15:18:22
Uptime 128 days 13 hr. 31 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/grid/product/19000LGR1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/srchost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=srchost.domain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA02" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_FRA01" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
The command completed successfully
 
[root@srchost ~]# lsnrctl stop
 
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 05-JUN-2025 07:19:08
 
Copyright (c) 1991, 2023, Oracle. All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=srchost.domain.com)(PORT=1521)))
The command completed successfully
 
GRID Home Backup
 
[root@srchost dump]# nohup tar -pczvf /u02/dump/Grid_home_Bkup.tar.gz /u01/app/grid/product/19000LGR1 &
[1] 699293
 
Oracle HOME backup
 
[oracle@srchost u02]$ nohup tar -pczvf /u02/oracle_home_Bkup.tar.gz /u01/app/rdbms/product/19000LDB1 &
[1] 687831
 

APPLY Patch
 
Opatchauto applies to both GI and RDBMS together
 
[root@srchost dump]# /u01/app/grid/product/19000LGR1/OPatch/opatchauto apply /u01/app/patch/PSU/37257886
 
OPatchauto session is initiated at Thu Jun 5 10:36:19 2025
 
System initialization log file is /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchautodb/systemconfig2025-06-05_10-36-24AM.log.
 
Session log file is /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/opatchauto2025-06-05_10-36-28AM.log
The id for this session is IY25
 
Executing OPatch prereq operations to verify patch applicability on home /u01/app/rdbms/product/19000LDB1
Patch applicability verified successfully on home /u01/app/rdbms/product/19000LDB1
 
Executing patch validation checks on home /u01/app/rdbms/product/19000LDB1
Patch validation checks successfully completed on home /u01/app/rdbms/product/19000LDB1
 
Verifying SQL patch applicability on home /u01/app/rdbms/product/19000LDB1
No sqlpatch prereq operations are required on the local node for this home
No step execution required.........
 
Executing OPatch prereq operations to verify patch applicability on home /u01/app/grid/product/19000LGR1
Patch applicability verified successfully on home /u01/app/grid/product/19000LGR1
 
Executing patch validation checks on home /u01/app/grid/product/19000LGR1
Patch validation checks successfully completed on home /u01/app/grid/product/19000LGR1
 
Preparing to bring down database service on home /u01/app/rdbms/product/19000LDB1
Successfully prepared home /u01/app/rdbms/product/19000LDB1 to bring down database service
 
Bringing down database service on home /u01/app/rdbms/product/19000LDB1
Database service successfully brought down on home /u01/app/rdbms/product/19000LDB1
 
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/grid/product/19000LGR1
Prepatch operation log file location: /u01/app/oracle/crsdata/srchost/crsconfig/hapatch_2025-06-05_10-40-49AM.log
CRS service brought down successfully on home /u01/app/grid/product/19000LGR1
 
Start applying binary patch on home /u01/app/rdbms/product/19000LDB1
Binary patch applied successfully on home /u01/app/rdbms/product/19000LDB1
 
Running rootadd_rdbms.sh on home /u01/app/rdbms/product/19000LDB1
Successfully executed rootadd_rdbms.sh on home /u01/app/rdbms/product/19000LDB1
 
Start applying binary patch on home /u01/app/grid/product/19000LGR1
Binary patch applied successfully on home /u01/app/grid/product/19000LGR1
 
Running rootadd_rdbms.sh on home /u01/app/grid/product/19000LGR1
Successfully executed rootadd_rdbms.sh on home /u01/app/grid/product/19000LGR1
 
Performing postpatch operations on CRS - starting CRS service on home /u01/app/grid/product/19000LGR1
Postpatch operation log file location: /u01/app/oracle/crsdata/srchost/crsconfig/hapatch_2025-06-05_11-10-29AM.log
CRS service started successfully on home /u01/app/grid/product/19000LGR1
 
Starting database service on home /u01/app/rdbms/product/19000LDB1
Database service successfully started on home /u01/app/rdbms/product/19000LDB1
 
Preparing home /u01/app/rdbms/product/19000LDB1 after database service restarted
No step execution required.........
 
Trying to apply SQL patch on home /u01/app/rdbms/product/19000LDB1
No SQL patch operations are required on local node for this home
 
OPatchAuto successful.
 
--------------------------------Summary--------------------------------
 
Patching is completed successfully. Please find the summary as follows:
 
Host:srchost
SIDB Home:/u01/app/rdbms/product/19000LDB1
Version:19.0.0.0.0
Summary:
 
==Following patches were SKIPPED:
 
Patch: /u01/app/patch/PSU/37257886/37266638
Reason: This patch is not applicable to this specified target type - "oracle_database"
 
Patch: /u01/app/patch/PSU/37257886/36758186
Reason: This patch is not applicable to this specified target type - "oracle_database"
 
Patch: /u01/app/patch/PSU/37257886/37461387
Reason: This patch is not applicable to this specified target type - "oracle_database"
 
==Following patches were SUCCESSFULLY applied:
 
Patch: /u01/app/patch/PSU/37257886/37260974
Log: /u01/app/rdbms/product/19000LDB1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-46-49AM_1.log
 
Patch: /u01/app/patch/PSU/37257886/37268031
Log: /u01/app/rdbms/product/19000LDB1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-46-49AM_1.log
 
Host:srchost
SIHA Home:/u01/app/grid/product/19000LGR1
Version:19.0.0.0.0
Summary:
 
==Following patches were SUCCESSFULLY applied:
 
Patch: /u01/app/patch/PSU/37257886/36758186
Log: /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-58-04AM_1.log
 
Patch: /u01/app/patch/PSU/37257886/37260974
Log: /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-58-04AM_1.log
 
Patch: /u01/app/patch/PSU/37257886/37266638
Log: /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-58-04AM_1.log
 
Patch: /u01/app/patch/PSU/37257886/37268031
Log: /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-58-04AM_1.log
 
Patch: /u01/app/patch/PSU/37257886/37461387
Log: /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/core/opatch/opatch2025-06-05_10-58-04AM_1.log
 
Patching session reported following warning(s):
 
[WARNING] The database instance 'oradb001' from '/u01/app/rdbms/product/19000LDB1', in host'srchost' is not running. SQL changes, if any, will not be applied.
To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
Refer to the readme to get the correct steps for applying the sql changes.
 
[WARNING] The database instance 'oradb002' from '/u01/app/rdbms/product/19000LDB1', in host'srchost' is not running. SQL changes, if any, will not be applied.
To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
Refer to the readme to get the correct steps for applying the sql changes.
 
OPatchauto session completed at Thu Jun 5 11:11:18 2025
Time taken to complete the session 34 minutes, 54 seconds
[root@srchost dump]#
 
 

Validate
 
[oracle@srchost 37257886]$ /u01/app/grid/product/19000LGR1/OPatch/opatch lsinv |grep -i desc
ARU platform description:: Linux x86-64
Patch description: "OCW RELEASE UPDATE 19.26.0.0.0 (37268031)"
Patch description: "Database Release Update : 19.26.0.0.250121 (37260974)"
Patch description: "OJVM RELEASE UPDATE: 19.18.0.0.230117 (34786990)"
 
[oracle@srchost 37257886]$ /u01/app/rdbms/product/19000LDB1/OPatch/opatch lsinv |grep -i desc
ARU platform description:: Linux x86-64
Patch description: "OCW RELEASE UPDATE 19.26.0.0.0 (37268031)"
Patch description: "Database Release Update : 19.26.0.0.250121 (37260974)"
Patch description: "OJVM RELEASE UPDATE: 19.18.0.0.230117 (34786990)"
[oracle@srchost 37257886]$
 
 
OJVM (37847857)   (If needed, requires Complete Downtime)
 
[root@srchost PSU]# /u01/app/grid/product/19000LGR1/OPatch/opatchauto apply /u01/app/patch/PSU/july_2025/37847857
 
OPatchauto session is initiated at Mon Nov 24 03:32:46 2025
 
System initialization log file is /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchautodb/systemconfig2025-11-24_03-32-48AM.log.
 
Session log file is /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/opatchauto2025-11-24_03-32-52AM.log
The id for this session is 5N3E
 
Executing OPatch prereq operations to verify patch applicability on home /u01/app/rdbms/product/19000LDB1
Patch applicability verified successfully on home /u01/app/rdbms/product/19000LDB1
 
Executing patch validation checks on home /u01/app/rdbms/product/19000LDB1
Patch validation checks successfully completed on home /u01/app/rdbms/product/19000LDB1
 
Verifying SQL patch applicability on home /u01/app/rdbms/product/19000LDB1
No sqlpatch prereq operations are required on the local node for this home
No step execution required.........
 
Executing OPatch prereq operations to verify patch applicability on home /u01/app/grid/product/19000LGR1
Patch applicability verified successfully on home /u01/app/grid/product/19000LGR1
 
Executing patch validation checks on home /u01/app/grid/product/19000LGR1
Patch validation checks successfully completed on home /u01/app/grid/product/19000LGR1
 
Preparing to bring down database service on home /u01/app/rdbms/product/19000LDB1
Successfully prepared home /u01/app/rdbms/product/19000LDB1 to bring down database service
 
Bringing down database service on home /u01/app/rdbms/product/19000LDB1
Database service successfully brought down on home /u01/app/rdbms/product/19000LDB1
 
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/grid/product/19000LGR1
Prepatch operation log file location: /u01/app/oracle/crsdata/srchost/crsconfig/hapatch_2025-11-24_03-37-31AM.log
CRS service brought down successfully on home /u01/app/grid/product/19000LGR1
 
Performing prepatch operation on home /u01/app/rdbms/product/19000LDB1
No step execution required.........
 
Start applying binary patch on home /u01/app/rdbms/product/19000LDB1
Binary patch applied successfully on home /u01/app/rdbms/product/19000LDB1
 
Running rootadd_rdbms.sh on home /u01/app/rdbms/product/19000LDB1
Successfully executed rootadd_rdbms.sh on home /u01/app/rdbms/product/19000LDB1
 
Performing postpatch operation on home /u01/app/rdbms/product/19000LDB1
No step execution required.........
 
Start applying binary patch on home /u01/app/grid/product/19000LGR1
Binary patch applied successfully on home /u01/app/grid/product/19000LGR1
 
Running rootadd_rdbms.sh on home /u01/app/grid/product/19000LGR1
Successfully executed rootadd_rdbms.sh on home /u01/app/grid/product/19000LGR1
 
Performing postpatch operations on CRS - starting CRS service on home /u01/app/grid/product/19000LGR1
Postpatch operation log file location: /u01/app/oracle/crsdata/srchost/crsconfig/hapatch_2025-11-24_03-51-53AM.log
CRS service started successfully on home /u01/app/grid/product/19000LGR1
 
Starting database service on home /u01/app/rdbms/product/19000LDB1
Database service successfully started on home /u01/app/rdbms/product/19000LDB1
 
Preparing home /u01/app/rdbms/product/19000LDB1 after database service restarted
No step execution required.........
 
Trying to apply SQL patch on home /u01/app/rdbms/product/19000LDB1
No SQL patch operations are required on local node for this home
 
OPatchAuto successful.
 
--------------------------------Summary--------------------------------
 
Patching is completed successfully. Please find the summary as follows:
 
Host:srchost
SIDB Home:/u01/app/rdbms/product/19000LDB1
Version:19.0.0.0.0
Summary:
 
==Following patches were SUCCESSFULLY applied:
 
Patch: /u01/app/patch/PSU/july_2025/37847857
Log: /u01/app/rdbms/product/19000LDB1/cfgtoollogs/opatchauto/core/opatch/opatch2025-11-24_03-43-26AM_1.log
 
Host:srchost
SIHA Home:/u01/app/grid/product/19000LGR1
Version:19.0.0.0.0
Summary:
 
==Following patches were SUCCESSFULLY applied:
 
Patch: /u01/app/patch/PSU/july_2025/37847857
Log: /u01/app/grid/product/19000LGR1/cfgtoollogs/opatchauto/core/opatch/opatch2025-11-24_03-47-58AM_1.log
 
Patching session reported following warning(s):
 
[WARNING] The database instance 'oradb001' from '/u01/app/rdbms/product/19000LDB1', in host'srchost' is not running. SQL changes, if any, will not be applied.
To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
Refer to the readme to get the correct steps for applying the sql changes.
 
[WARNING] The database instance 'oradb002' from '/u01/app/rdbms/product/19000LDB1', in host'srchost' is not running. SQL changes, if any, will not be applied.
To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
Refer to the readme to get the correct steps for applying the sql changes.
 
OPatchauto session completed at Mon Nov 24 03:52:35 2025
Time taken to complete the session 19 minutes, 49 seconds
[root@srchost PSU]#
 
 
Verify
 
[oracle@srchost OPatch]$ /u01/app/rdbms/product/19000LDB1/OPatch/opatch lspatches
37847857;OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857)
37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
37960098;Database Release Update : 19.28.0.0.250715 (37960098)
 
OPatch succeeded.
 
[oracle@srchost OPatch]$ /u01/app/grid/product/19000LGR1/OPatch/opatch lspatches
37847857;OJVM RELEASE UPDATE: 19.28.0.0.250715 (37847857)
37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
37960098;Database Release Update : 19.28.0.0.250715 (37960098)
 
OPatch succeeded.
[oracle@srchost OPatch]$
 
 
Datapatch (set the DB env and run data patch)
 
• Set DB env and starup database
• Startup all PDBS
• Run datapatch
 
ORADB001 database
 
[oracle@srchost 37257886]$ sqlplus / as sysdba
 
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jun 5 11:20:57 2025
Version 19.26.0.0.0
 
Copyright (c) 1982, 2024, Oracle. All rights reserved.
 
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.26.0.0.0
 
SQL> set pages 999 lines 280
col ACTION_TIME for a32
col description for a66
 
select patch_id,PATCH_TYPE,status,ACTION_TIME,description from dba_registry_sqlpatch order by 4 desc ;
 
PATCH_ID PATCH_TYPE STATUS ACTION_TIME DESCRIPTION
 
34786990 INTERIM SUCCESS 18-JUL-23 02.09.35.338328 PM OJVM RELEASE UPDATE: 19.18.0.0.230117 (34786990)
34765931 RU SUCCESS 18-JUL-23 02.09.35.333465 PM DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)
 
If some PDB’s are down/mount state then bring up those and Re-run Datapatch again (Data patch can be run Multiple times)
 
SQL> select CON_ID, NAME, OPEN_MODE, TOTAL_SIZE/1024/1024/1024 GB from v$containers;
 
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
 
Pluggable database altered.
 
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.26.0.0.0
 

Run DATAPATCH
 

[oracle@srchost CB]$ /u01/app/rdbms/product/19000LDB1/OPatch/datapatch -verbose

SQL Patching tool version 19.26.0.0.0 Production on Thu Jun 5 11:21:57 2025

Copyright (c) 2012, 2025, Oracle. All rights reserved.

 

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_920293_2025_06_05_11_21_57/sqlpatch_invocation.log

 

Connecting to database...OK

Gathering database info...done

 

Note: Datapatch will only apply or rollback SQL fixes for PDBs

that are in an open state, no patches will be applied to closed PDBs.

Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation

(Doc ID 1585822.1)

 

Warning: PDB PDB1 is in mode MOUNTED and will be skipped.

Warning: PDB PDB2 is in mode MOUNTED and will be skipped.

Bootstrapping registry and package to current versions...done

Determining current state...done

 

Current state of interim SQL patches:

Interim patch 34786990 (OJVM RELEASE UPDATE: 19.18.0.0.230117 (34786990)):

Binary registry: Installed

PDB CDB$ROOT: Applied successfully on 18-JUL-23 02.09.35.338328 PM

                                 ----- Trimmed output --------------

Current state of release update SQL patches:

Binary registry:

19.26.0.0.0 Release_Update 250118124854: Installed

PDB CDB$ROOT:

Applied 19.18.0.0.0 Release_Update 230127005551 successfully on 18-JUL-23 02.09.35.333465 PM

PDB PDB$SEED:

Applied 19.18.0.0.0 Release_Update 230127005551 successfully on 18-JUL-23 02.23.53.576581 PM

                                  ----- Trimmed output --------------

 Adding patches to installation queue and performing prereq checks...done

Installation queue:

For the following PDBs: CDB$ROOT PDB$SEED PDB1 PDB2

No interim patches need to be rolled back

Patch 37260974 (Database Release Update : 19.26.0.0.250121 (37260974)):

Apply from 19.18.0.0.0 Release_Update 230127005551 to 19.26.0.0.0 Release_Update 250118124854

No interim patches need to be applied

 

Installing patches...

Patch installation complete. Total patches installed: 7

 

Validating logfiles...done

Patch 37260974 apply (pdb CDB$ROOT): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/37260974/26040769/37260974_apply_ORADB001_CDBROOT_2025Jun05_11_23_55.log (no errors)

Patch 37260974 apply (pdb PDB$SEED): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/37260974/26040769/37260974_apply_ORADB001_PDBSEED_2025Jun05_11_28_07.log (no errors)

Patch 37260974 apply (pdb PLUG1): SUCCESS

logfile:

                  --------- Trimmed Output  ------------

 SQL Patching tool complete on Thu Jun 5 11:31:42 2025 




Startup DB services
 
[root@srchost PSU]# ps -ef |grep pmon
oracle 2967215 1 0 03:52 ? 00:00:00 asm_pmon_+ASM
root 2970762 65033 0 03:55 pts/1 00:00:00 grep --color=auto pmon
 
 
POST Steps:
 
SQL> sho pdbs
 
CON_ID CON_NAME                       OPEN MODE  RESTRICTED
     2 PDB$SEED                       READ ONLY  NO
    
 
• Datapatch doesnt apply to PDB which are DOWN , so start again and rerun the datapatch
• When you open PDB , PDB opens with warning and in Restricted mode with PDB violations like below (still can run datapatch)
 
After Datapatch run, bounce all PDB’s and verify in DB


Auto Scroll Stop Scroll