通过查看补丁 README:You must use the OPatch utility version 12.2.0.1.5 or later to apply this patch. ,要求 OPatch 版本要大于 12.2.0.1.5,这里一上来我就踩了个坑。
检查当前 OPatch 补丁是否符合要求:
1 2 3 4 5
[grid@lucifer01 ~]$ cd$ORACLE_HOME/OPatch/ [grid@lucifer01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.6
OPatch succeeded.
一看这里符合要求,我就没管了,然后我就踩坑了。
坑一
如果不更新 OPatch,直接应用补丁,报错内容如下:
1 2 3 4 5 6 7
Opatchauto in 12.2 requires the creation of a wallet file with password for owner of grid software on all nodes.
Failure of specifying wallet would result into the below errors :
OPATCHAUTO-68021: Missing required argument(s). OPATCHAUTO-68021: The following argument(s) are required: [-wallet] OPATCHAUTO-68021: Provide the required argument(s).
只有更新 OPatch 到 12.2.0.1.8 之后才不会需要 -wallet 选项,否则强制需要,可参考 MOS 文档:
Creation of opatchauto wallet in 12.2 in 12.2.0.1.8 (Doc ID 2270185.1)
Invalid current directory. Please run opatchauto from other than '/root' and '/' directory. And check if the home owner user has write permission setfor the current directory. opatchauto returns with error code = 2
建议在补丁目录下执行:
1 2
[root@lucifer01:/root]# cd /soft/24396050 [root@lucifer02:/soft/24396050]# $GI_HOME/OPatch/opatchauto apply /soft/24396050 -oh $GI_HOME -analyze
Shared home /u01/app/12.2.0/grid can only be patched in nonrolling mode.
OPATCHAUTO-72030: Execution mode invalid. OPATCHAUTO-72030: Cannot execute in rolling mode, as CRS home is shared. OPATCHAUTO-72030: Execute in non-rolling mode.
设置之后即可执行成功,具体可参考 MOS 文档:
Prepare for and Top Issues of RU Patching via “opatchauto apply” and “opatchauto resume” in Different User Environment (Doc ID 2840546.1)
Issue #7 OPATCHAUTO-72030: Cannot execute in rolling mode, as CRS home is shared
OPatchauto session is initiated at Tue Mar 25 14:32:12 2025
System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2025-03-25_02-32-14PM.log.
Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2025-03-25_02-32-21PM.log The idfor this session is PPD4
Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid Patch applicability verified successfully on home /u01/app/12.2.0/grid
Executing patch validation checks on home /u01/app/12.2.0/grid Patch validation checks successfully completed on home /u01/app/12.2.0/grid
OPatchauto session is initiated at Tue Mar 25 14:42:25 2025
System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2025-03-25_02-42-26PM.log.
Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2025-03-25_02-42-34PM.log The idfor this session is HPWC
Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid Patch applicability verified successfully on home /u01/app/12.2.0/grid
Executing patch validation checks on home /u01/app/12.2.0/grid Patch validation checks successfully completed on home /u01/app/12.2.0/grid
OPatchauto session is initiated at Tue Mar 25 14:35:47 2025
System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2025-03-25_02-35-49PM.log.
Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2025-03-25_02-35-56PM.log The idfor this session is 1V5S
Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid Patch applicability verified successfully on home /u01/app/12.2.0/grid
Executing patch validation checks on home /u01/app/12.2.0/grid Patch validation checks successfully completed on home /u01/app/12.2.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/12.2.0/grid Prepatch operation log file location: /u01/app/grid/crsdata/lucifer01/crsconfig/crspatch_lucifer01_2025-03-25_02-36-05PM.log CRS service brought down successfully on home /u01/app/12.2.0/grid
Start applying binary patch on home /u01/app/12.2.0/grid Binary patch applied successfully on home /u01/app/12.2.0/grid
Running rootadd_rdbms.sh on home /u01/app/12.2.0/grid Successfully executed rootadd_rdbms.sh on home /u01/app/12.2.0/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/12.2.0/grid Postpatch operation log file location: /u01/app/grid/crsdata/lucifer01/crsconfig/crspatch_lucifer01_2025-03-25_02-38-35PM.log CRS service started successfully on home /u01/app/12.2.0/grid
OPatchauto session is initiated at Tue Mar 25 14:43:47 2025
System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2025-03-25_02-43-49PM.log.
Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2025-03-25_02-43-56PM.log The idfor this session is PWUR
Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid Patch applicability verified successfully on home /u01/app/12.2.0/grid
Executing patch validation checks on home /u01/app/12.2.0/grid Patch validation checks successfully completed on home /u01/app/12.2.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/12.2.0/grid Prepatch operation log file location: /u01/app/grid/crsdata/lucifer02/crsconfig/crspatch_lucifer02_2025-03-25_02-44-04PM.log CRS service brought down successfully on home /u01/app/12.2.0/grid
Start applying binary patch on home /u01/app/12.2.0/grid Binary patch applied successfully on home /u01/app/12.2.0/grid
Running rootadd_rdbms.sh on home /u01/app/12.2.0/grid Successfully executed rootadd_rdbms.sh on home /u01/app/12.2.0/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/12.2.0/grid Postpatch operation log file location: /u01/app/grid/crsdata/lucifer02/crsconfig/crspatch_lucifer02_2025-03-25_02-45-49PM.log CRS service started successfully on home /u01/app/12.2.0/grid