OPatch Utility Information
You must use the OPatch utility version 12.2.0.1.42 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 12.2 which is available for download from My Oracle Support patch 6880880
step-by-step guide to update OPatch to version 12.2.0.1.42 or later and apply patch 36582629 (GI RELEASE UPDATE 19.24.0.0.0) on a 2-node Oracle RAC environment using OPatchAuto in rolling mode.
Preparation Steps
Verify Current OPatch Version: Check the OPatch version on both the GRID_HOME and ORACLE_HOME:
- Ensure the version is at least
12.2.0.1.42
. If not, update OPatch.
- Ensure the version is at least
Download Latest OPatch Utility:
- Download the latest OPatch version for 12.2 from Oracle Support (Patch 6880880).
- Extract the OPatch zip file:
Update OPatch in GRID_HOME and ORACLE_HOME: Backup the existing OPatch directories:
Copy the new OPatch:
Verify Updated OPatch Version:
Steps to Apply Patch in Rolling Mode
Download the Patch:
- Download patch 36582629 from My Oracle Support.
- Place it in a shared location accessible from both nodes, e.g.,
/backup/Patch_19_24
.
Verify Patch Applicability: Run the following on both GRID_HOME and ORACLE_HOME to ensure no conflicts:
Run OPatchAuto: On Node 1 (
root@rac09-p
), apply the patch:- This command automatically applies the patch to the GRID_HOME and ORACLE_HOME in rolling mode.
- Logs are generated:
- System Config Log:
/u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchautodb/systemconfig<timestamp>.log
- Session Log:
/u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/opatchauto<timestamp>.log
- System Config Log:
Wait for Node 1 Completion:
- The patching process will apply the patch to Node 1 and then continue automatically to Node 2.
- Confirm patch application status in the logs.
Verify Patch Application on Both Nodes:
- Check patch inventory:
Post-Patch Validation
Cluster and Node Status: Verify the status of the cluster and all services:
Check Database Instances: Ensure all database instances are running:
Review Logs:
- Validate patch logs for any warnings or errors.
[grid@rac09-p ~]$ cd $ORACLE_HOME/OPatch [grid@rac09-p OPatch]$ ls -lrt total 168 -rw-r----- 1 grid oinstall 27 Jun 28 13:03 version.txt -rw-r----- 1 grid oinstall 2977 Jun 28 13:03 README.txt drwxr-xr-x 2 grid oinstall 4096 Jun 28 13:03 private -rw-r----- 1 grid oinstall 3177 Jun 28 13:03 operr_readme.txt -rwxr-x--- 1 grid oinstall 3159 Jun 28 13:03 operr drwxr-x--- 4 grid oinstall 4096 Jun 28 13:03 opatchprereqs -rwxr-x--- 1 grid oinstall 2551 Jun 28 13:03 opatch.pl -rwxr-x--- 1 grid oinstall 4290 Jun 28 13:03 opatch_env.sh -rwxr-x--- 1 grid oinstall 50933 Jun 28 13:03 opatch drwxr-x--- 5 grid oinstall 4096 Jun 28 13:03 ocm -rwxr-x--- 1 grid oinstall 23550 Jun 28 13:03 emdpatch.pl -rwxr-x--- 1 grid oinstall 589 Jun 28 13:03 datapatch drwxr-x--- 2 grid oinstall 4096 Jun 28 13:03 config drwxr-x--- 3 grid oinstall 4096 Jun 28 13:04 plugins drwxr-x--- 3 grid oinstall 4096 Jun 28 13:04 oracle_common drwxr-x--- 2 grid oinstall 4096 Jun 28 13:04 oplan -rwxr-x--- 1 grid oinstall 393 Jun 28 13:04 opatchauto.cmd -rwxr-x--- 1 grid oinstall 1763 Jun 28 13:04 opatchauto drwxr-x--- 7 grid oinstall 4096 Jun 28 13:04 modules drwxr-x--- 2 grid oinstall 4096 Jun 28 13:04 docs drwxr-x--- 7 grid oinstall 4096 Jun 28 13:04 auto drwxr-x--- 2 grid oinstall 4096 Aug 29 21:32 scripts drwxr-x--- 2 grid oinstall 4096 Aug 29 21:32 jlib [grid@rac09-p OPatch]$ [grid@rac09-p OPatch]$ [grid@rac09-p OPatch]$ [grid@rac09-p OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /backup/Patch_19_24/36582629/36582781 Oracle Interim Patch Installer version 12.2.0.1.43 Copyright (c) 2024, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/grid/19.3.0/gridhome_1 Central Inventory : /u01/oracle/oraInventory from : /u01/app/grid/19.3.0/gridhome_1/oraInst.loc OPatch version : 12.2.0.1.43 OUI version : 12.2.0.7.0 Log file location : /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatch/opatch2024-10-20_19-27-28PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac09-p OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /backup/Patch_19_24/36582629/36587798
Oracle Interim Patch Installer version 12.2.0.1.43
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/19.3.0/gridhome_1
Central Inventory : /u01/oracle/oraInventory
from : /u01/app/grid/19.3.0/gridhome_1/oraInst.loc
OPatch version : 12.2.0.1.43
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatch/opatch2024-10-20_19-35-19PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac09-p OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /backup/Patch_19_24/36582629/36590554
Oracle Interim Patch Installer version 12.2.0.1.43
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/19.3.0/gridhome_1
Central Inventory : /u01/oracle/oraInventory
from : /u01/app/grid/19.3.0/gridhome_1/oraInst.loc
OPatch version : 12.2.0.1.43
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatch/opatch2024-10-20_19-38-45PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac09-p OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /backup/Patch_19_24/36582629/36648174
Oracle Interim Patch Installer version 12.2.0.1.43
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/19.3.0/gridhome_1
Central Inventory : /u01/oracle/oraInventory
from : /u01/app/grid/19.3.0/gridhome_1/oraInst.loc
OPatch version : 12.2.0.1.43
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatch/opatch2024-10-20_19-40-30PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac09-p OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /backup/Patch_19_24/36582629/36758186
Oracle Interim Patch Installer version 12.2.0.1.43
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/19.3.0/gridhome_1
Central Inventory : /u01/oracle/oraInventory
from : /u01/app/grid/19.3.0/gridhome_1/oraInst.loc
OPatch version : 12.2.0.1.43
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatch/opatch2024-10-20_19-42-11PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[grid@rac09-p OPatch]$ ./opatch prereq CheckSystemSpace -phBaseFile /backup/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.43
Copyright (c) 2024, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/19.3.0/gridhome_1
Central Inventory : /u01/oracle/oraInventory
from : /u01/app/grid/19.3.0/gridhome_1/oraInst.loc
OPatch version : 12.2.0.1.43
OUI version : 12.2.0.7.0
Log file location : /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatch/opatch2024-10-20_19-55-09PM_1.log
Invoking prereq "checksystemspace"
Prereq "checkSystemSpace" passed.
OPatch succeeded.
[grid@rac09-p OPatch]$ env | grep ORA
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/grid/grid_base
ORACLE_HOME=/u01/app/grid/19.3.0/gridhome_1
grid@rac09-p opatchautodb]$ su - root
Password:
[root@rac09-p ~]#
[root@rac09-p ~]#
[root@rac09-p opatchautodb]#
[root@rac09-p opatchautodb]# cd /backup/
[root@rac09-p backup]#
[root@rac09-p backup]# ls -lrt
total 7618972
drwxr-xr-x 5 oracle oinstall 4096 Oct 4 2023 35643107
-rw-rw-r-- 1 oracle oinstall 1799202 Oct 18 2023 PatchSearch.xml
-rwxrwxr-x 1 grid oinstall 2889184573 Aug 25 23:28 LINUX.X64_193000_grid_home.zip
drwxrwxr-x 3 grid oinstall 4096 Aug 29 09:45 grid_patch
-rwxrwxr-x 1 oracle oinstall 3059705302 Sep 1 09:54 LINUX.X64_193000_db_home.zip
-rwxrwxr-x 1 oracle oinstall 1815725977 Oct 16 16:42 p35643107_190000_Linux-x86-64.zip
-rwxrwxr-x 1 root root 27746581 Oct 16 23:04 p6880880_230000_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 190 Oct 20 19:49 patch_list_gihome.txt
drwxr-xr-x 3 grid oinstall 4096 Oct 20 19:53 Patch_19_24
[root@rac09-p backup]# cd Patch_19_24/ ------go inside the folder/directory
[root@rac09-p Patch_19_24]# ls -lrt
total 3370716
drwxr-x--- 8 grid oinstall 4096 Jul 13 23:20 36582629
-rw-rw-r-- 1 grid oinstall 2470333 Jul 16 17:04 PatchSearch.xml
-rwxrwxr-x 1 grid oinstall 3445758071 Oct 16 23:00 p36582629_190000_Linux-x86-64.zip
[root@rac09-p Patch_19_24]#
[root@rac09-p Patch_19_24]#
[root@rac09-p Patch_19_24]# export PATH=$PATH:/u01/app/grid/19.3.0/gridhome_1/OPatch ---------> export the PATH
[root@rac09-p Patch_19_24]#
[root@rac09-p Patch_19_24]#
[root@rac09-p Patch_19_24]# opatch version ------> Check the opatch version
OPatch Version: 12.2.0.1.43
OPatch succeeded.
[root@rac09-p Patch_19_24]#
[root@rac09-p Patch_19_24]#
[root@rac09-p Patch_19_24]# opatchauto apply /backup/Patch_19_24/36582629 ---------->on Node1 using Root user
OPatchauto session is initiated at Sun Oct 20 20:30:43 2024
System initialization log file is /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchautodb/systemconfig2024-10-20_08-31-00PM.log.
Session log file is /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/opatchauto2024-10-20_08-31-52PM.log
The id for this session is 3J6D
Executing OPatch prereq operations to verify patch applicability on home /u01/app/grid/19.3.0/gridhome_1
Patch applicability verified successfully on home /u01/app/grid/19.3.0/gridhome_1
Executing OPatch prereq operations to verify patch applicability on home /u02/app/oracle/database/19.3.0/dbhome_1
Patch applicability verified successfully on home /u02/app/oracle/database/19.3.0/dbhome_1
Executing patch validation checks on home /u01/app/grid/19.3.0/gridhome_1
Patch validation checks successfully completed on home /u01/app/grid/19.3.0/gridhome_1
Executing patch validation checks on home /u02/app/oracle/database/19.3.0/dbhome_1
Patch validation checks successfully completed on home /u02/app/oracle/database/19.3.0/dbhome_1
Verifying SQL patch applicability on home /u02/app/oracle/database/19.3.0/dbhome_1
"[/bin/sh -c 'cd /u02/app/oracle/database/19.3.0/dbhome_1; ORACLE_HOME=/u02/app/oracle/database/19.3.0/dbhome_1 ORACLE_SID=DEVDB1 /u02/app/oracle/database/19.3.0/dbhome_1/OPatch/datapatch -prereq -verbose']" command failed with errors. Please refer to logs for more details. SQL changes, if any, can be analyzed by manually retrying the same command.
SQL patch applicability verified successfully on home /u02/app/oracle/database/19.3.0/dbhome_1
Preparing to bring down database service on home /u02/app/oracle/database/19.3.0/dbhome_1
Successfully prepared home /u02/app/oracle/database/19.3.0/dbhome_1 to bring down database service
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/grid/19.3.0/gridhome_1
Prepatch operation log file location: /u01/app/grid/grid_base/crsdata/rac09-p/crsconfig/crs_prepatch_apply_inplace_rac09-p_2024-10-20_08-44-40PM.log
CRS service brought down successfully on home /u01/app/grid/19.3.0/gridhome_1
Performing prepatch operation on home /u02/app/oracle/database/19.3.0/dbhome_1
Prepatch operation completed successfully on home /u02/app/oracle/database/19.3.0/dbhome_1
Start applying binary patch on home /u02/app/oracle/database/19.3.0/dbhome_1
Binary patch applied successfully on home /u02/app/oracle/database/19.3.0/dbhome_1
Running rootadd_rdbms.sh on home /u02/app/oracle/database/19.3.0/dbhome_1
Successfully executed rootadd_rdbms.sh on home /u02/app/oracle/database/19.3.0/dbhome_1
Performing postpatch operation on home /u02/app/oracle/database/19.3.0/dbhome_1
Postpatch operation completed successfully on home /u02/app/oracle/database/19.3.0/dbhome_1
Start applying binary patch on home /u01/app/grid/19.3.0/gridhome_1
Binary patch applied successfully on home /u01/app/grid/19.3.0/gridhome_1
Running rootadd_rdbms.sh on home /u01/app/grid/19.3.0/gridhome_1
Successfully executed rootadd_rdbms.sh on home /u01/app/grid/19.3.0/gridhome_1
Performing postpatch operations on CRS - starting CRS service on home /u01/app/grid/19.3.0/gridhome_1
Postpatch operation log file location: /u01/app/grid/grid_base/crsdata/rac09-p/crsconfig/crs_postpatch_apply_inplace_rac09-p_2024-10-20_10-19-06PM.log
CRS service started successfully on home /u01/app/grid/19.3.0/gridhome_1
Preparing home /u02/app/oracle/database/19.3.0/dbhome_1 after database service restarted
No step execution required.........
Trying to apply SQL patch on home /u02/app/oracle/database/19.3.0/dbhome_1
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:rac09-p
RAC Home:/u02/app/oracle/database/19.3.0/dbhome_1
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /backup/Patch_19_24/36582629/36590554
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /backup/Patch_19_24/36582629/36758186
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /backup/Patch_19_24/36582629/36648174
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY applied:
Patch: /backup/Patch_19_24/36582629/36582781
Log: /u02/app/oracle/database/19.3.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_20-49-47PM_1.log
Patch: /backup/Patch_19_24/36582629/36587798
Log: /u02/app/oracle/database/19.3.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_20-49-47PM_1.log
Host:rac09-p
CRS Home:/u01/app/grid/19.3.0/gridhome_1
Version:19.0.0.0.0
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /backup/Patch_19_24/36582629/36582781
Log: /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_21-35-22PM_1.log
Patch: /backup/Patch_19_24/36582629/36587798
Log: /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_21-35-22PM_1.log
Patch: /backup/Patch_19_24/36582629/36590554
Log: /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_21-35-22PM_1.log
Patch: /backup/Patch_19_24/36582629/36648174
Log: /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_21-35-22PM_1.log
Patch: /backup/Patch_19_24/36582629/36758186
Log: /u01/app/grid/19.3.0/gridhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-20_21-35-22PM_1.log
Patching session reported following warning(s):
_________________________________________________
[WARNING] The database instance 'PRODDB1' from '/u02/app/oracle/database/19.3.0/dbhome_1', in host'rac09-p' 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 Sun Oct 20 22:47:34 2024
Time taken to complete the session 136 minutes, 35 seconds ---------------------Patch completed successfully
[oracle@rac09-p OPatch]$
[oracle@rac09-p OPatch]$ sqlplus '/as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Oct 20 23:02:55 2024
Version 19.24.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.24.0.0.0
SQL>
SQL>
SQL> SELECT TO_CHAR(STARTUP_TIME,'MON-DD-RR HH24:MI:SS') AS "Inst Start Time" FROM V$INSTANCE;
Inst Start Time
------------------
OCT-20-24 22:22:10
ORACLE_SID = [DEVDB1] ? orcl1
The Oracle base remains unchanged with value /u02/app/oracle/oracle_base
[oracle@rac09-p OPatch]$
[oracle@rac09-p OPatch]$ sqlplus '/as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Oct 20 23:06:11 2024
Version 19.24.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.24.0.0.0
SQL> SELECT TO_CHAR(STARTUP_TIME,'MON-DD-RR HH24:MI:SS') AS "Inst Start Time" FROM V$INSTANCE;
Inst Start Time
---------------------------
OCT-20-24 22:22:08
-Node2------rac10-p------------------No impact on Node2 while applying auto patch on Node1----------------------------------------------------------------
[oracle@rac10-p ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Oct 20 23:04:15 2024
Version 19.21.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.21.0.0.0
SQL>
SQL>
SQL> SELECT TO_CHAR(STARTUP_TIME,'MON-DD-RR HH24:MI:SS') AS "Inst Start Time" FROM V$INSTANCE;
Inst Start Time
---------------------------
OCT-20-24 19:29:40
----------------------
Note:- By Comparing the Instance startup time, it is confirmed that "AUTO" patch is applied ton RAC1 node1
Go to the Node 2:- Do all pre-requisities and apply the patch using ROOT user
[root@rac10-p Patch_19_24]# export PATH=$PATH:/u01/app/grid/19.3.0/gridhome_1/OPatch ----------> export the PATH
[root@rac10-p Patch_19_24]#
[root@rac10-p Patch_19_24]#
[root@rac10-p Patch_19_24]# opatch version -----------------------> Check the opatch version
OPatch Version: 12.2.0.1.43
OPatch succeeded.
[root@rac10-p Patch_19_24]#
[root@rac10-p Patch_19_24]#
[root@rac10-p Patch_19_24]# opatchauto apply /backup/Patch_19_24/36582629 --------------------->Actual patch on Node1 using Root user
Datapatch
***************
[oracle@rac09-p OPatch]$ sqlplus '/as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 21 22:23:13 2024
Version 19.24.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.24.0.0.0
SQL>
SQL>
SQL> set lin 1000
col action form a12
col version form a40
col description form a85
col action_date form a20
select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version
from dba_registry_sqlpatch;
SQL> SQL> SQL> SQL> SQL> SQL> 2
set lin 200
col action form a12
col version form a40
col description form a85
col action_date form a20
select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version
from dba_registry_sqlpatch;
DESCRIPTION ACTION ACTION_DATE VERSION
------------------------------------------------------------ ------------ -------------------- ----------------------------------------
Database Release Update : 19.21.0.0.231017 (35643107) APPLY 16/10/24 23:18:32
Note:- Not getting any output of the query because we don't run datapatch -verbose
[oracle@rac09-p OPatch]$ sqlplus '/as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 21 22:25:29 2024
Version 19.24.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.24.0.0.0
SQL>
set lin 200
col action form a12
col version form a40
col description form a55
col action_date form a20
select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version from dba_registry_sqlpatch;
SQL> SQL> SQL> SQL> SQL> SQL> 2
no rows selected
SQL> select name from v$database;
NAME
---------
DEVDB
Crosscheck the applied patch:-
[oracle@rac09-p OPatch]$ ./opatch lspatches
36587798;OCW RELEASE UPDATE 19.24.0.0.0 (36587798)
36582781;Database Release Update : 19.24.0.0.240716 (36582781)
OPatch succeeded.
[oracle@rac09-p OPatch]$ ./datapatch -sanity_checks
SQL Patching sanity checks version 19.24.0.0.0 on Mon 21 Oct 2024 10:28:38 PM IST
Copyright (c) 2021, 2024, Oracle. All rights reserved.
Log file for this invocation: /u02/app/oracle/oracle_base/cfgtoollogs/sqlpatch/sanity_checks_20241021_222838_444888/sanity_checks_20241021_222838_444888.log
Running checks
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 942.
Use of uninitialized value $pdb in hash element at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 946.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 942.
Use of uninitialized value $pdb in hash element at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 946.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 942.
Use of uninitialized value $pdb in hash element at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 946.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 942.
Use of uninitialized value $pdb in hash element at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 946.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /u02/app/oracle/database/19.3.0/dbhome_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Host key verification failed.
Host key verification failed.
Host key verification failed.
JSON report generated in /u02/app/oracle/oracle_base/cfgtoollogs/sqlpatch/sanity_checks_20241021_222838_444888/sqlpatch_sanity_checks_summary.json file
Checks completed. Printing report:
Check: Database component status - INFO
There should be no INVALID components prior patching due to risk of potential errors.
Listed components have a non-valid status.
Run '?/rdbms/admin/utlrp.sql' (per container) to try recompiling invalid objects and restore component status.
:
| COMPONENT | STATUS |
|-----------+--------|
| CATALOG | LOADED |
|-----------+--------|
| CATPROC | LOADED |
|-----------+--------|
Check: PDB Violations - OK
Check: Invalid System Objects - WARNING
There should be no INVALID objects in Oracle-maintained schemas before patching.
The following number of objects are INVALID (per container).
Run '?/rdbms/admin/utlrp.sql' (per container) to try recompiling invalid objects.
:
| OBJECT_COUNT |
|--------------|
| 71 |
|--------------|
Check: Tablespace Status - ERROR
Temp tablespaces must have sufficient space for patching. Minimum recommended space is 2GB.
Tablespace is above 80% of used space or it has less than 2GB of space left.
Ensure there is adequate tablespace for patching. Note suggested quantities are an estimated minimum size value, it is strongly recommended to adjust the data file maximum size as needed based on testing. Refer to the section "Managing Data Files and Temp Files" in the Oracle Database Administrator's Guide for details on managing data file operations.
:
| AUTO_EXTENSIBLE | FREE_TABLESPACE | TABLESPACE_NAME | TABLESPACE_SIZE | USAGE |
|-----------------+-----------------+-----------------+-----------------+-------|
| NO | 81.88 | SYSAUX | 500 | 83.63 |
|-----------------+-----------------+-----------------+-----------------+-------|
Check: Backup jobs - OK
Check: Temp file exists - OK
Check: Temp file online - OK
Check: Data Pump running - OK
Check: Container status - OK
Check: Oracle Database Keystore - OK
Check: Dictionary statistics gathering - OK
Check: Scheduled Jobs - WARNING
Execution of scheduler jobs while database patching is running may lead to failures and/or performance issues.
There are jobs currently running or scheduled to be executed during next hour.
Consider patching the database when jobs are not running and will not be scheduled to run during patching.
To check for jobs that are running or scheduled to run:
SELECT owner as schema_name, job_name, state, next_run_date
FROM sys.all_scheduler_jobs
WHERE state = 'RUNNING'
UNION
SELECT owner as schema_name, job_name, state, next_run_date
FROM sys.all_scheduler_jobs
WHERE state = 'SCHEDULED'
and cast(next_run_date as date) > sysdate
and cast(next_run_date as date) < sysdate + 1/24;
:
| JOB_NAME | NEXT_RUN_DATE | SCHEMA_NAME | STATE |
|--------------------------+-------------------------------------+-------------+-----------|
| CLEANUP_NON_EXIST_OBJ | 21-OCT-24 11.12.50.435517 PM +05:30 | SYS | SCHEDULED |
|--------------------------+-------------------------------------+-------------+-----------|
| CLEANUP_ONLINE_IND_BUILD | 21-OCT-24 11.14.06.697539 PM +05:30 | SYS | SCHEDULED |
|--------------------------+-------------------------------------+-------------+-----------|
| CLEANUP_ONLINE_PMO | 21-OCT-24 11.14.46.869041 PM +05:30 | SYS | SCHEDULED |
|--------------------------+-------------------------------------+-------------+-----------|
| CLEANUP_TAB_IOT_PMO | 21-OCT-24 11.14.16.078934 PM +05:30 | SYS | SCHEDULED |
|--------------------------+-------------------------------------+-------------+-----------|
| CLEANUP_TRANSIENT_TYPE | 21-OCT-24 11.12.48.717276 PM +05:30 | SYS | SCHEDULED |
|--------------------------+-------------------------------------+-------------+-----------|
Check: GoldenGate triggers - OK
Check: Logminer DDL triggers - OK
Check: Check sys public grants - OK
Check: Statistics gathering running - OK
Check: Optim dictionary upgrade parameter - OK
Check: Symlinks on oracle home path - OK
Check: Central Inventory - OK
Check: Queryable Inventory dba directories - ERROR
Datapatch uses Queryable Patch Inventory to query for Patch information from within the database. This feature uses Oracle directory objects to reference physical directories on the server. Hence, these directory objects and paths must exist and be defined correctly.
There are inconsistencies with the Queryable Inventory directories.
Verify that the directories used by Queryable Patch Inventory are defined correctly and are relative to the ORACLE HOME. Check both physical paths and directory objects; and create or correct as needed. Refer to MOS NOTE 1602089.1 for more details.
rac10-p.priyadba.com:
Could not determine if directory OPATCH_LOG_DIR /u02/app/oracle/database/19.3.0/dbhome_1/rdbms/log exists.
Could not determine if directory OPATCH_SCRIPT_DIR /u02/app/oracle/database/19.3.0/dbhome_1/QOpatch exists.
Could not determine if directory OPATCH_INST_DIR /u02/app/oracle/database/19.3.0/dbhome_1/OPatch exists.
Check: Queryable Inventory locks - SKIPPED (ERROR)
Message: Skipped as previous check wasn't executed successfully.
Check: Queryable Inventory package - SKIPPED (ERROR)
Message: Skipped as previous check wasn't executed successfully.
Check: Queryable Inventory external table - SKIPPED (ERROR)
Message: Skipped as previous check wasn't executed successfully.
Check: Imperva processes - OK
Check: Guardium processes - OK
Check: Locale - OK
Refer to MOS Note 2680521.1 and debug log
/u02/app/oracle/oracle_base/cfgtoollogs/sqlpatch/sanity_checks_20241021_222838_444888/sanity_checks_debug_20241021_222838_444888.log
SQL Patching sanity checks completed on Mon 21 Oct 2024 10:28:49 PM IST
The datapatch -verbose command is used to apply or rollback SQL changes associated with an Oracle patch (e.g., PSU, RU, or OJVM patches) to a database after patching the binaries.
[oracle@rac09-p OPatch]$ ./datapatch -verbose
SQL Patching tool version 19.24.0.0.0 Production on Mon Oct 21 22:47:13 2024
Copyright (c) 2012, 2024, Oracle. All rights reserved.
Log file for this invocation: /u02/app/oracle/oracle_base/cfgtoollogs/sqlpatch/sqlpatch_455159_2024_10_21_22_47_13/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
19.24.0.0.0 Release_Update 240627235157: Installed
SQL registry:
Applied 19.21.0.0.0 Release_Update 230930151951 successfully on 16-OCT-24 11.18.32.652226 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
No interim patches need to be rolled back
Patch 36582781 (Database Release Update : 19.24.0.0.240716 (36582781)):
Apply from 19.21.0.0.0 Release_Update 230930151951 to 19.24.0.0.0 Release_Update 240627235157
No interim patches need to be applied
Installing patches...
Patch installation complete. Total patches installed: 1
Validating logfiles...done
Patch 36582781 apply: SUCCESS
logfile: /u02/app/oracle/oracle_base/cfgtoollogs/sqlpatch/36582781/25751445/36582781_apply_ORCL_2024Oct21_22_51_21.log (no errors)
SQL Patching tool complete on Mon Oct 21 22:59:20 2024
Node1:-
SQL> set lin 200
col action form a12
col version form a40
col description form a55
col action_date form a20
select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version from dba_registry_sqlpatch;SQL> SQL> SQL> SQL> SQL> SQL>
DESCRIPTION ACTION ACTION_DATE VERSION
------------------------------------------------------- ------------ -------------------- ----------------------------------------
Database Release Update : 19.21.0.0.231017 (35643107) APPLY 16/10/24 23:18:32
Database Release Update : 19.24.0.0.240716 (36582781) APPLY 21/10/24 22:57:33
[oracle@rac10-p ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 21 23:07:34 2024
Version 19.24.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.24.0.0.0
SQL>
SQL>
SQL> set lin 200
col action form a12
col version form a40
col description form a55
col action_date form a20
select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version from dba_registry_sqlpatch;SQL> SQL> SQL> SQL> SQL> SQL>
DESCRIPTION ACTION ACTION_DATE VERSION
------------------------------------------------------- ------------ -------------------- ----------------------------------------
Database Release Update : 19.21.0.0.231017 (35643107) APPLY 16/10/24 23:18:32
Database Release Update : 19.24.0.0.240716 (36582781) APPLY 21/10/24 22:57:33
SQL>
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
orcl2
Common Scenarios for
datapatch
Usage
Post-Patch SQL Application: After applying a patch to the binaries,
datapatch
ensures that SQL changes (e.g., dictionary updates) are applied to the database.Reapply SQL Changes: If a database was created after a patch was applied to the binaries, rerun
datapatch -verbose
to apply the SQL changes to the new database.Rollback SQL Changes: If a patch was rolled back from the binaries, use
datapatch -verbose
to rollback SQL changes in the database.
No comments:
Post a Comment