RU19.25 Standalone (GI和DB分开打)
参考文档:Patch 36916690 - GI Release Update 19.25.0.0.241015
2.1.1.1 OPatch Utility Information
12.2.0.1.42 or later
2.1.1.2 Validation of Oracle Inventory
分别在GI和Oracle Home下执行
$ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>su - grid
/u01/app/19.0.0/grid/OPatch/opatch lsinventory -detail -oh /u01/app/19.0.0/gridsu - oracle
/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/19.0.0/db_1
2.1.1.4 Run OPatch Conflict Check
su - grid
/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36912597
/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36917416
/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36917397
/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36940756
/u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36758186su - oracle
/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36912597
/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /stage/36916690/36917416
2.1.1.5 Run OPatch System Space Check
su - grid
cat /tmp/patch_list_gihome.txt/stage/36916690/36912597
/stage/36916690/36917416
/stage/36916690/36917397
/stage/36916690/36940756
/stage/36916690/36758186/u01/app/19.0.0/grid/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txtsu - oracle
cat /tmp/patch_list_dbhome.txt/stage/36916690/36912597
/stage/36916690/36917416/u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
2.1.4 OPatchAuto Out-of-Place Patching
-- 一次性打GI和DB home的补丁
To patch the Grid home and all Oracle RAC database homes of the same version:
# opatchauto apply <UNZIPPED_PATCH_LOCATION>/36916690
-- 分开打GI和DB的补丁
To patch only the Grid home:
# opatchauto apply <UNZIPPED_PATCH_LOCATION>/36916690 -oh <GI_HOME>To patch one or more Oracle RAC database homes:
# opatchauto apply <UNZIPPED_PATCH_LOCATION>/36916690 -oh <oracle_home1_path>,<oracle_home2_path>su - root
/u01/app/19.0.0/grid/OPatch/opatchauto apply /stage/36916690 -oh /u01/app/19.0.0/grid
/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /stage/36916690 -oh /u01/app/oracle/product/19.0.0/db_1
-- log
[root@asm19c 36916690]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /stage/36916690 -oh /u01/app/19.0.0/gridOPatchauto session is initiated at Fri Oct 18 10:02:57 2024System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2024-10-18_10-03-09AM.log.Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2024-10-18_10-03-17AM.log
The id for this session is NTZYExecuting OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid
Patch applicability verified successfully on home /u01/app/19.0.0/gridExecuting patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/gridPerforming prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/asm19c/crsconfig/hapatch_2024-10-18_10-13-39AM.log
CRS service brought down successfully on home /u01/app/19.0.0/gridStart applying binary patch on home /u01/app/19.0.0/grid
Binary patch applied successfully on home /u01/app/19.0.0/gridRunning rootadd_rdbms.sh on home /u01/app/19.0.0/grid
Successfully executed rootadd_rdbms.sh on home /u01/app/19.0.0/gridPerforming postpatch operations on CRS - starting CRS service on home /u01/app/19.0.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/asm19c/crsconfig/hapatch_2024-10-18_10-32-51AM.log
CRS service started successfully on home /u01/app/19.0.0/gridOPatchAuto successful.--------------------------------Summary--------------------------------Patching is completed successfully. Please find the summary as follows:Host:asm19c
SIHA Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
Summary:==Following patches were SKIPPED:Patch: /stage/36916690/36758186
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-04-03AM_1.log
Reason: /stage/36916690/36758186 is not required to be applied to oracle home /u01/app/19.0.0/grid==Following patches were SUCCESSFULLY applied:Patch: /stage/36916690/36912597
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-14-44AM_1.logPatch: /stage/36916690/36917397
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-14-44AM_1.logPatch: /stage/36916690/36917416
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-14-44AM_1.logPatch: /stage/36916690/36940756
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-14-44AM_1.logOPatchauto session completed at Fri Oct 18 10:34:43 2024
Time taken to complete the session 31 minutes, 35 seconds
[root@asm19c 36916690]#
[root@asm19c 36916690]# /u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /stage/36916690 -oh /u01/app/oracle/product/19.0.0/db_1OPatchauto session is initiated at Fri Oct 18 10:38:35 2024System initialization log file is /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchautodb/systemconfig2024-10-18_10-38-59AM.log.Session log file is /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/opatchauto2024-10-18_10-39-14AM.log
The id for this session is JWACExecuting OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0.0/db_1
Patch applicability verification failed on home /u01/app/oracle/product/19.0.0/db_1Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : asm19c->/u01/app/oracle/product/19.0.0/db_1 Type[sidb]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/oracle/product/19.0.0/db_1, host: asm19c.
Command failed: /u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /stage/36916690 -oh /u01/app/oracle/product/19.0.0/db_1 -target_type oracle_database -binary -invPtrLoc /u01/app/oracle/product/19.0.0/db_1/oraInst.loc -jre /u01/app/oracle/product/19.0.0/db_1/OPatch/jre -persistresult /u01/app/oracle/product/19.0.0/db_1/opatchautocfg/db/sessioninfo/sessionresult_analyze_asm19c_sidb_2.ser -analyze -online -prepare_home
Command failure output:
==Following patches FAILED in analysis for apply:Patch: /stage/36916690/36917416
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-40-00AM_1.log
Reason: Failed during Analysis: CheckSystemSpace Failed, [ Prerequisite Status: FAILED, Prerequisite output:
The details are:
Required amount of space(9413.939MB) is not available.]Patch: /stage/36916690/36912597
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_10-40-00AM_1.log
Reason: Failed during Analysis: CheckSystemSpace Failed, [ Prerequisite Status: FAILED, Prerequisite output:
The details are:
Required amount of space(9413.939MB) is not available.] After fixing the cause of failure start a new opatchauto session
]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.OPatchauto session completed at Fri Oct 18 10:51:56 2024
Time taken to complete the session 12 minutes, 59 secondsopatchauto failed with error code 42
[root@asm19c 36916690]#
-- 修复空间问题后,resume
[root@asm19c 36916690]# /u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto resume
Session log file is /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/opatchauto2024-10-18_11-24-07AM.log
Resuming existing session with id JWACExecuting OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0.0/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/19.0.0/db_1Executing patch validation checks on home /u01/app/oracle/product/19.0.0/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/19.0.0/db_1Verifying SQL patch applicability on home /u01/app/oracle/product/19.0.0/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.0.0/db_1Preparing to bring down database service on home /u01/app/oracle/product/19.0.0/db_1
Successfully prepared home /u01/app/oracle/product/19.0.0/db_1 to bring down database serviceBringing down database service on home /u01/app/oracle/product/19.0.0/db_1
Following database has been stopped and will be restarted later during the session: test
Database service successfully brought down on home /u01/app/oracle/product/19.0.0/db_1Start applying binary patch on home /u01/app/oracle/product/19.0.0/db_1
Binary patch applied successfully on home /u01/app/oracle/product/19.0.0/db_1Running rootadd_rdbms.sh on home /u01/app/oracle/product/19.0.0/db_1
Successfully executed rootadd_rdbms.sh on home /u01/app/oracle/product/19.0.0/db_1Starting database service on home /u01/app/oracle/product/19.0.0/db_1
Database service successfully started on home /u01/app/oracle/product/19.0.0/db_1Preparing home /u01/app/oracle/product/19.0.0/db_1 after database service restarted
No step execution required.........Trying to apply SQL patch on home /u01/app/oracle/product/19.0.0/db_1
SQL patch applied successfully on home /u01/app/oracle/product/19.0.0/db_1OPatchAuto successful.--------------------------------Summary--------------------------------Patching is completed successfully. Please find the summary as follows:Host:asm19c
SIDB Home:/u01/app/oracle/product/19.0.0/db_1
Version:19.0.0.0.0
Summary:==Following patches were SKIPPED:Patch: /stage/36916690/36917397
Reason: This patch is not applicable to this specified target type - "oracle_database"Patch: /stage/36916690/36758186
Reason: This patch is not applicable to this specified target type - "oracle_database"Patch: /stage/36916690/36940756
Reason: This patch is not applicable to this specified target type - "oracle_database"==Following patches were SUCCESSFULLY applied:Patch: /stage/36916690/36912597
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_11-39-15AM_1.logPatch: /stage/36916690/36917416
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2024-10-18_11-39-15AM_1.logOPatchauto session completed at Fri Oct 18 12:05:50 2024
Time taken to complete the session 41 minutes, 46 seconds
[root@asm19c 36916690]#
-- 验证
[grid@asm19c ~]$ cd $ORACLE_HOME/OPatch
[grid@asm19c OPatch]$ ./opatch lspatches
36940756;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36940756)
36917416;OCW RELEASE UPDATE 19.25.0.0.0 (36917416)
36917397;ACFS RELEASE UPDATE 19.25.0.0.0 (36917397)
36912597;Database Release Update : 19.25.0.0.241015 (36912597)
36758186;DBWLM RELEASE UPDATE 19.0.0.0.0 (36758186)OPatch succeeded.
[grid@asm19c OPatch]$
[oracle@asm19c OPatch]$ ./opatch lspatches
36917416;OCW RELEASE UPDATE 19.25.0.0.0 (36917416)
36912597;Database Release Update : 19.25.0.0.241015 (36912597)OPatch succeeded.
[oracle@asm19c OPatch]$
SQL> set linesize 200
SQL> col action for a14
SQL> col status for a20
SQL> col description for a70
SQL> select action,status,description from dba_registry_sqlpatch;ACTION STATUS DESCRIPTION
-------------- -------------------- ----------------------------------------------------------------------
APPLY SUCCESS Database Release Update : 19.3.0.0.190416 (29517242)
APPLY SUCCESS Database Release Update : 19.7.0.0.200414 (30869156)
APPLY SUCCESS Database Release Update : 19.12.0.0.210720 (32904851)
APPLY SUCCESS Database Release Update : 19.24.0.0.240716 (36582781)
APPLY SUCCESS Database Release Update : 19.25.0.0.241015 (36912597)SQL>
END