p31305339_190000_Linux-x86-64/README.html
根据如上补丁集自带文档大致操作步骤概要如下。
■■GIHOME、DBHOME替换已有的opatch工具
unzip p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
■■1.2.1.4 Run OPatch Conflict Check
---For Grid Infrastructure Home, as home user:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/patch/31305339/31281355
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/patch/31305339/31305087
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/patch/31305339/31304218
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/patch/31305339/31335188
---For Database home, as home user:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/patch/31305339/31281355
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/patch/31305339/31305087
■■1.2.1.5 Run OPatch SystemSpace Check
---For Grid Infrastructure Home, as home user:
Create file /tmp/patch_list_gihome.txt with the following content:
cat > /tmp/patch_list_gihome.txt << EOF
/u01/soft/patch/31305339/31281355
/u01/soft/patch/31305339/31305087
/u01/soft/patch/31305339/31304218
/u01/soft/patch/31305339/31335188
EOF
Run the opatch command to check if enough free space is available in the Grid Infrastructure Home:
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
---For Database home, as home user:
Create file /tmp/patch_list_dbhome.txt with the following content:
cat > /tmp/patch_list_dbhome.txt << EOF
/u01/soft/patch/31305339/31281355
/u01/soft/patch/31305339/31305087
EOF
Run opatch command to check if enough free space is available in the Database Home:
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
■■opatchauto
Use root user to do this:
export PATH=$PATH:/u01/app/12.2.0/grid/OPatch
To patch the GI home and all Oracle RAC database homes of the same version:
opatchauto apply /u01/soft/patch/31305339
To patch only the GI home:
opatchauto apply /u01/soft/patch/31305339 -oh /u01/app/12.2.0/grid
To patch one or more Oracle RAC database homes:
opatchauto apply /u01/soft/patch/31305339 -oh /u01/app/oracle/product/12.2.0/db_1
To roll back the patch from the GI home and each Oracle RAC database home:
opatchauto rollback /u01/soft/patch/31305339 -oh /u01/app/12.2.0/grid
■■下附apply过程
[root@zzjk01:1 /u01/soft]$ export PATH=$PATH:/u01/app/12.2.0/grid/OPatch [root@zzjk01:1 /u01/soft]$ opatchauto apply /u01/soft/patch/31305339 OPatchauto session is initiated at Tue Sep 22 18:15:54 2020 System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2020-09-22_06-15-56PM.log. Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2020-09-22_06-16-52PM.log The id for this session is ADSM Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2.0/db_1 Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid Patch applicability verified successfully on home /u01/app/oracle/product/12.2.0/db_1 Patch applicability verified successfully on home /u01/app/12.2.0/grid Verifying SQL patch applicability on home /u01/app/oracle/product/12.2.0/db_1 SQL patch applicability verified successfully on home /u01/app/oracle/product/12.2.0/db_1 Preparing to bring down database service on home /u01/app/oracle/product/12.2.0/db_1 Successfully prepared home /u01/app/oracle/product/12.2.0/db_1 to bring down database service Bringing down CRS service on home /u01/app/12.2.0/grid CRS service brought down successfully on home /u01/app/12.2.0/grid Performing prepatch operation on home /u01/app/oracle/product/12.2.0/db_1 Perpatch operation completed successfully on home /u01/app/oracle/product/12.2.0/db_1 Start applying binary patch on home /u01/app/oracle/product/12.2.0/db_1 Binary patch applied successfully on home /u01/app/oracle/product/12.2.0/db_1 Performing postpatch operation on home /u01/app/oracle/product/12.2.0/db_1 Postpatch operation completed successfully on home /u01/app/oracle/product/12.2.0/db_1 Start applying binary patch on home /u01/app/12.2.0/grid Binary patch applied successfully on home /u01/app/12.2.0/grid Starting CRS service on home /u01/app/12.2.0/grid CRS service started successfully on home /u01/app/12.2.0/grid Preparing home /u01/app/oracle/product/12.2.0/db_1 after database service restarted No step execution required......... Trying to apply SQL patch on home /u01/app/oracle/product/12.2.0/db_1 SQL patch applied successfully on home /u01/app/oracle/product/12.2.0/db_1 OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find the summary as follows: Host:zzjk01 RAC Home:/u01/app/oracle/product/12.2.0/db_1 Version:19.0.0.0.0 Summary: ==Following patches were SKIPPED: Patch: /u01/soft/patch/31305339/31304218 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /u01/soft/patch/31305339/31335188 Reason: This patch is not applicable to this specified target type - "rac_database" ==Following patches were SUCCESSFULLY applied: Patch: /u01/soft/patch/31305339/31281355 Log: /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-22_18-21-01PM_1.log Patch: /u01/soft/patch/31305339/31305087 Log: /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-22_18-21-01PM_1.log Host:zzjk01 CRS Home:/u01/app/12.2.0/grid Version:19.0.0.0.0 Summary: ==Following patches were SUCCESSFULLY applied: Patch: /u01/soft/patch/31305339/31281355 Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-22_18-25-28PM_1.log Patch: /u01/soft/patch/31305339/31304218 Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-22_18-25-28PM_1.log Patch: /u01/soft/patch/31305339/31305087 Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-22_18-25-28PM_1.log Patch: /u01/soft/patch/31305339/31335188 Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-22_18-25-28PM_1.log OPatchauto session completed at Tue Sep 22 18:40:23 2020 Time taken to complete the session 24 minutes, 29 seconds
文章评论
注:单独给oracle打补丁,需要使用oracle的opatch,不能使用grid的opatch,如下。
/u01/app/oracle/product/12.2.0/db_1/OPatch/opatchauto apply /u01/soft/patch/31305339 -oh /u01/app/oracle/product/12.2.0/db_1
另:19c需要在建库后使用opatchauto一次性打补丁,否则出现grid补丁成功oracle补丁失败的情况
19.8打完补丁后的状态:
[grid@rac1:20 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
31335188;TOMCAT RELEASE UPDATE 19.0.0.0.0 (31335188)
31305087;OCW RELEASE UPDATE 19.8.0.0.0 (31305087)
31304218;ACFS RELEASE UPDATE 19.8.0.0.0 (31304218)
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
---
[oracle@rac1:20 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
31305087;OCW RELEASE UPDATE 19.8.0.0.0 (31305087)
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
adg单实例:
[oracle@adg1:0 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)