Loading... ## 一、升级说明 > --记录时间:2021.03.03 > 具体升级方法方法参考补丁中的<span style='color:green'>README.HTML</span>,里面介绍的很详细; > 安装的19c版本是19.3,需要升级到更高版本,当前最新补丁版本是19.10; > > 升级补丁的顺序(19.10的包,包含GI和DB,可以自动安装GI和DB): > GI > DB > OJVM > One off > 下载补丁: [p32226239_190000_Linux-x86-64](https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=2725758.1),Patch 32226239 - GI Release Update 19.10.0.0.210119 ## 二、Opatch补丁工具版本 ```bash [grid@rac01 grid]$ cd $ORACLE_HOME/OPatch [grid@rac01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.17 OPatch succeeded. ``` > README.HTML要求补丁工具版本是12.2.0.1.23,不符合要求,下载Opatch工具[**Patch 6880880**](https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880),选择对应的版本 ![](https://cdn.jsdelivr.net/gh/klausyao/imageshosting/oracle/rac/opatchrac19c/image001.png) > 上传下载的p6880880_190000_Linux-x86-64.zip工具到所有节点,解压覆盖原Opatch,此处上传的是/u01目录 ```bash # Grid用户 [grid@rac01 OPatch]$ unzip /u01/p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME [grid@rac02 OPatch]$ unzip /u01/p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME [grid@rac01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.24 OPatch succeeded. [grid@rac02 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.24 OPatch succeeded. # Oracle用户 [oracle@rac01 ~]$ unzip /u01/p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME [oracle@rac02 ~]$ unzip /u01/p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME ``` ## 三、校验Oracle Inventory ```bash [grid@rac02 OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME OPatch succeeded. [grid@rac01 OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME OPatch succeeded. [oracle@rac02 OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME OPatch succeeded. [oracle@rac01 OPatch]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME OPatch succeeded. ``` ## 四、检查Opatch冲突 ```bash # Grid用户 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/32218454 OPatch succeeded. $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/32222571 OPatch succeeded. $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/32218663 OPatch succeeded. $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/29340594 OPatch succeeded. $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/32240590 OPatch succeeded. # Oracle用户 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/32218454 OPatch succeeded. $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/32226239/32222571 OPatch succeeded. ``` ## 五、检查OPatch空间大小 ### 5.1 For Grid Infrastructure Home, as home user ```bash # 1.Create file /tmp/patch_list_gihome.txt with the following content: cat /tmp/patch_list_gihome.txt /tmp/32226239/32218454 /tmp/32226239/32222571 /tmp/32226239/32218663 /tmp/32226239/29340594 /tmp/32226239/32240590 # 2.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 OPatch succeeded. ``` ### 5.2 For Database home, as home user: ```bash # 1.Create file /tmp/patch_list_dbhome.txt with the following content: cat /tmp/patch_list_dbhome.txt /tmp/32226239/32218454 /tmp/32226239/32222571 # 2.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 OPatch succeeded. ``` ## 六、解压 ```bash # 进入安装包所在目录解压,给与grid对补丁的权限 # To apply the patch, it must be accessible from all nodes in the Oracle cluster. Download the patch and unzip it to a shared location, this is called the <UNZIPPED_PATCH_LOCATION>. This directory must be empty and not be /tmp. Additionally, the directory should have read permission for the ORA_INSTALL group. $ cd <UNZIPPED_PATCH_LOCATION> Check that the directory is empty. $ ls Unzip the patch as grid home owner except for installations that do not have any grid homes. For installations where this patch will be applied to the Database home only, the patch needs to be unzipped as the database home owner. $ unzip p32226239_190000_Linux-x86-64.zip # 此处直接解压到 /tmp目录 # 如果没有权限可以对文件授权 # chown grid.asmadmin p32226239_190000_Linux-x86-64.zip [root@rac01 u01]# su - grid Last login: Wed Mar 3 18:07:29 CST 2021 on pts/1 [grid@rac01 ~]$ cd /tmp [grid@rac01 tmp]$ unzip /u01/p32226239_190000_Linux-x86-64.zip [root@rac02 u01]# su - grid Last login: Wed Mar 3 18:07:29 CST 2021 on pts/1 [grid@rac02 ~]$ cd /tmp [grid@rac02 tmp]$ unzip /u01/p32226239_190000_Linux-x86-64.zip ``` ## 七、节点1安装补丁 > ***The most common configurations are listed as follows:*** > Case 1: Oracle RAC, where the GI Home and the Database Homes are not shared and ACFS file system is not configured > Case 2: Oracle RAC, where the GI Home is not shared, Database Home is shared, ACFS may be used > Case 3: Non-Oracle RAC Database homes > Case 1: Oracle RAC, where the GI Home and the Database Homes are not shared and ACFS file system is not configured. > <span style='color:green'>As root user</span>,execute the following command on each node of the cluster: > > ```bash > # 节点执行升级 > /u01/app/19.3.0/grid/OPatch/opatchauto apply /tmp/32226239 > # 安装日志: > [root@rac01 ~]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /tmp/32226239 > OPatchauto session is initiated at Wed Mar 3 22:12:46 2021 > System initialization log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-03-03_10-13-15PM.log. > Session log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/opatchauto2021-03-03_10-14-45PM.log > The id for this session is IHI4 > Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.3.0/grid > Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/dbhome_1 > Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 > Patch applicability verified successfully on home /u01/app/19.3.0/grid > Executing patch validation checks on home /u01/app/19.3.0/grid > Patch validation checks successfully completed on home /u01/app/19.3.0/grid > Executing patch validation checks on home /u01/app/oracle/product/19.3.0/dbhome_1 > Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/dbhome_1 > Verifying SQL patch applicability on home /u01/app/oracle/product/19.3.0/dbhome_1 > SQL patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 > Preparing to bring down database service on home /u01/app/oracle/product/19.3.0/dbhome_1 > Successfully prepared home /u01/app/oracle/product/19.3.0/dbhome_1 to bring down database service > Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.3.0/grid > Prepatch operation log file location: /u01/app/grid/crsdata/rac01/crsconfig/crs_prepatch_apply_inplace_rac01_2021-03-03_10-18-16PM.log > CRS service brought down successfully on home /u01/app/19.3.0/grid > Performing prepatch operation on home /u01/app/oracle/product/19.3.0/dbhome_1 > Perpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 > Start applying binary patch on home /u01/app/oracle/product/19.3.0/dbhome_1 > Binary patch applied successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 > Performing postpatch operation on home /u01/app/oracle/product/19.3.0/dbhome_1 > Postpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 > Start applying binary patch on home /u01/app/19.3.0/grid > Binary patch applied successfully on home /u01/app/19.3.0/grid > Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.3.0/grid > Postpatch operation log file location: /u01/app/grid/crsdata/rac01/crsconfig/crs_postpatch_apply_inplace_rac01_2021-03-03_11-20-50PM.log > CRS service started successfully on home /u01/app/19.3.0/grid > Preparing home /u01/app/oracle/product/19.3.0/dbhome_1 after database service restarted > No step execution required......... > Trying to apply SQL patch on home /u01/app/oracle/product/19.3.0/dbhome_1 > SQL patch applied successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 > OPatchAuto successful. > --------------------------------Summary-------------------------------- > Patching is completed successfully. Please find the summary as follows: > Host:rac01 > RAC Home:/u01/app/oracle/product/19.3.0/dbhome_1 > Version:19.0.0.0.0 > Summary: > ==Following patches were SKIPPED: > Patch: /tmp/32226239/32218663 > Reason: This patch is not applicable to this specified target type - "rac_database" > Patch: /tmp/32226239/29340594 > Reason: This patch is not applicable to this specified target type - "rac_database" > Patch: /tmp/32226239/32240590 > Reason: This patch is not applicable to this specified target type - "rac_database" > ==Following patches were SUCCESSFULLY applied: > Patch: /tmp/32226239/32218454 > Log: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-33-59PM_1.log > Patch: /tmp/32226239/32222571 > Log: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-33-59PM_1.log > Host:rac01 > CRS Home:/u01/app/19.3.0/grid > Version:19.0.0.0.0 > Summary: > ==Following patches were SUCCESSFULLY applied: > Patch: /tmp/32226239/29340594 > Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-48-02PM_1.log > Patch: /tmp/32226239/32218454 > Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-48-02PM_1.log > Patch: /tmp/32226239/32218663 > Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-48-02PM_1.log > Patch: /tmp/32226239/32222571 > Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-48-02PM_1.log > Patch: /tmp/32226239/32240590 > Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-04_17-48-02PM_1.log > OPatchauto session completed at Thu Mar 4 18:22:00 2021 > Time taken to complete the session 55 minutes, 48 seconds > ``` ## 八、传输文件 ```bash #错误一命令: [grid@rac01 ~]$ scp /u01/app/oraInventory/ContentsXML/oui-patch.xml grid@rac02:/u01/app/oraInventory/ContentsXML/ [root@rac02 ~]# chmod 660 /u01/app/oraInventory/ContentsXML/oui-patch.xml #错误二命令: [oracle@rac01 ~]$ cd /u01/app/oracle/product/19.3.0/dbhome_1/inventory/oneoffs/ [oracle@rac01 oneoffs]$ scp -r 32218454 oracle@rac02:/u01/app/oracle/product/19.3.0/dbhome_1/inventory/oneoffs #错误三命令: [root@rac02 ~]# chmod 755 /u01/app/19.3.0/grid/crs/install/cmdllroot.sh [root@rac02 ~]# chown grid:oinstall /u01/app/19.3.0/grid/crs/install/cmdllroot.sh ``` ## 九、节点2遇到的错误 > 通过提前设置以上三条命令后才安装成功; > 1.硬件条件不够导致安装制终止: > 2.虚拟机中,因为CPU和内存等限制,有时打补丁中途会出现错误,因为CPU超出或不足物理CPU核数 > 3.另外初始8G内存增加到16G,也会导致安装失败,查询得知应对应增加shm设定的内存,但最终在8G2核2线程下安装,过程太久... ```bash [root@rac02 ~]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /tmp/32226239 OPatchauto session is initiated at Fri Mar 5 22:31:23 2021 System initialization log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-03-05_10-31-38PM.log. Session log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/opatchauto2021-03-05_10-32-38PM.log The id for this session is BYLB Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/dbhome_1 Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.3.0/grid Patch applicability verified successfully on home /u01/app/19.3.0/grid Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 Executing patch validation checks on home /u01/app/19.3.0/grid Patch validation checks successfully completed on home /u01/app/19.3.0/grid Executing patch validation checks on home /u01/app/oracle/product/19.3.0/dbhome_1 Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/dbhome_1 Verifying SQL patch applicability on home /u01/app/oracle/product/19.3.0/dbhome_1 SQL patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 Preparing to bring down database service on home /u01/app/oracle/product/19.3.0/dbhome_1 Successfully prepared home /u01/app/oracle/product/19.3.0/dbhome_1 to bring down database service Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.3.0/grid Prepatch operation log file location: /u01/app/grid/crsdata/rac02/crsconfig/crs_prepatch_apply_inplace_rac02_2021-03-05_10-35-05PM.log CRS service brought down successfully on home /u01/app/19.3.0/grid Performing prepatch operation on home /u01/app/oracle/product/19.3.0/dbhome_1 Perpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 Start applying binary patch on home /u01/app/oracle/product/19.3.0/dbhome_1 Binary patch applied successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 Performing postpatch operation on home /u01/app/oracle/product/19.3.0/dbhome_1 Postpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 Start applying binary patch on home /u01/app/19.3.0/grid Binary patch applied successfully on home /u01/app/19.3.0/grid Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.3.0/grid Postpatch operation log file location: /u01/app/grid/crsdata/rac02/crsconfig/crs_postpatch_apply_inplace_rac02_2021-03-05_11-32-07PM.log CRS service started successfully on home /u01/app/19.3.0/grid Preparing home /u01/app/oracle/product/19.3.0/dbhome_1 after database service restarted No step execution required......... Trying to apply SQL patch on home /u01/app/oracle/product/19.3.0/dbhome_1 SQL patch applied successfully on home /u01/app/oracle/product/19.3.0/dbhome_1 OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find the summary as follows: Host:rac02 RAC Home:/u01/app/oracle/product/19.3.0/dbhome_1 Version:19.0.0.0.0 Summary: ==Following patches were SKIPPED: Patch: /tmp/32226239/32218663 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /tmp/32226239/29340594 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /tmp/32226239/32240590 Reason: This patch is not applicable to this specified target type - "rac_database" ==Following patches were SUCCESSFULLY applied: Patch: /tmp/32226239/32218454 Log: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_22-38-10PM_1.log Patch: /tmp/32226239/32222571 Log: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_22-38-10PM_1.log Host:rac02 CRS Home:/u01/app/19.3.0/grid Version:19.0.0.0.0 Summary: ==Following patches were SUCCESSFULLY applied: Patch: /tmp/32226239/29340594 Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_23-00-15PM_1.log Patch: /tmp/32226239/32218454 Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_23-00-15PM_1.log Patch: /tmp/32226239/32218663 Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_23-00-15PM_1.log Patch: /tmp/32226239/32222571 Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_23-00-15PM_1.log Patch: /tmp/32226239/32240590 Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-05_23-00-15PM_1.log OPatchauto session completed at Sat Mar 6 00:35:41 2021 Time taken to complete the session 124 minutes, 22 seconds ``` ### 9.1错误一 > #权限不足,授权即可 > ……… > /u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)' > ……… ![](https://cdn.jsdelivr.net/gh/klausyao/imageshosting/oracle/rac/opatchrac19c/image002.png) ```bash [root@rac02 ~]# chmod 660 /u01/app/oraInventory/ContentsXML/oui-patch.xml /u01/app/19.3.0/grid/OPatch/opatchauto resume ``` ### 9.2错误二 > 节点2的补丁没有相应的文件夹和文件32218454; > MOS建议从节点1安装成功复制过去即可. ![](https://cdn.jsdelivr.net/gh/klausyao/imageshosting/oracle/rac/opatchrac19c/image003.png) ```bash [oracle@rac01 32218454]$ cd /u01/app/oracle/product/19.3.0/dbhome_1/inventory/oneoffs/ [oracle@rac01 oneoffs]$ scp -r 32218454 oracle@rac02:/u01/app/oracle/product/19.3.0/dbhome_1/inventory/oneoffs inventory.xml 100% 425KB 3.2MB/s 00:00 actions.xml 100% 2748KB 6.0MB/s 00:00 /u01/app/19.3.0/grid/OPatch/opatchauto resume ``` ### 9.3 错误三 > 节点2的权限提示不对,修改即可 ![](https://cdn.jsdelivr.net/gh/klausyao/imageshosting/oracle/rac/opatchrac19c/image004.png) ```bash ---------------------------Patching Failed--------------------------------- ….. PRVH-0116 : Path "/u01/app/19.3.0/grid/crs/install/cmdllroot.sh" with permissions "rw-r--r--" does not have execute permissions for the owner, file's group, and others on node "rac02". PRVG-2031 : Owner of file "/u01/app/19.3.0/grid/crs/install/cmdllroot.sh" did not match the expected value on node "rac02". [Expected = "grid(1001)" ; Found = "root(0)"] PRVG-2032 : Group of file "/u01/app/19.3.0/grid/crs/install/cmdllroot.sh" did not match the expected value on node "rac02". [Expected = "oinstall(54321)" ; Found = "root(0)"] CRS-4000: Command Start failed, or completed with errors. 2021/03/05 02:13:02 CLSRSC-117: Failed to start Oracle Clusterware stack from the Grid Infrastructure home /u01/app/19.3.0/grid After fixing the cause of failure Run opatchauto resume ] 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 Mar 5 02:13:04 2021 Time taken to complete the session 36 minutes, 25 seconds ``` ```bash [root@rac02 ~]# chmod 755 /u01/app/19.3.0/grid/crs/install/cmdllroot.sh [root@rac02 ~]# chown grid:oinstall /u01/app/19.3.0/grid/crs/install/cmdllroot.sh /u01/app/19.3.0/grid/OPatch/opatchauto resume ``` ## 十、验证 ```bash # rac01 [grid@rac01 ~]$ $ORACLE_HOME/bin/kfod op=patches --------------- List of Patches =============== 29340594 32218454 32218663 32222571 32240590 [grid@rac01 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.2.0.1.24 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/19.3.0/grid Central Inventory : /u01/app/oraInventory from : /u01/app/19.3.0/grid/oraInst.loc OPatch version : 12.2.0.1.24 OUI version : 12.2.0.7.0 Log file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/opatch2021-03-06_01-28-05AM_1.log Lsinventory Output file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2021-03-06_01-28-05AM.txt -------------------------------------------------------------------------------- …….. 31796277, 31796882, 31798742, 31800757, 31807516, 31815099, 31816158 31816631, 31820632, 31820859, 31823051, 31827605, 31827912, 31829617 31829639, 31833172, 31833948, 31835854, 31836454, 31839779, 31842545 31843462, 31847489, 31849859, 31851383, 31852574, 31854692, 31855526 31860193, 31862359, 31863118, 31866141, 31867037, 31869601, 31871692 …….. Patch 29340594 : applied on Fri Mar 05 23:00:29 CST 2021 Unique Patch ID: 24005319 Patch description: "DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)" Created on 8 Jan 2021, 01:44:40 hrs PST8PDT Bugs fixed: 31862202, 31554751, 31547458 [oracle@rac01 ~]$ sqlplus -v SQL*Plus: Release 19.0.0.0.0 - Production Version 19.10.0.0.0 [grid@rac01 OPatch]$ sqlplus -v SQL*Plus: Release 19.0.0.0.0 - Production Version 19.10.0.0.0 ``` ```bash # rac02 [grid@rac02 ~]$ $ORACLE_HOME/bin/kfod op=patches --------------- List of Patches =============== 29340594 32218454 32218663 32222571 32240590 [grid@rac02 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.2.0.1.24 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/19.3.0/grid Central Inventory : /u01/app/oraInventory from : /u01/app/19.3.0/grid/oraInst.loc OPatch version : 12.2.0.1.24 OUI version : 12.2.0.7.0 Log file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/opatch2021-03-06_01-28-05AM_1.log Lsinventory Output file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2021-03-06_01-28-05AM.txt -------------------------------------------------------------------------------- …….. 31796277, 31796882, 31798742, 31800757, 31807516, 31815099, 31816158 31816631, 31820632, 31820859, 31823051, 31827605, 31827912, 31829617 31829639, 31833172, 31833948, 31835854, 31836454, 31839779, 31842545 31843462, 31847489, 31849859, 31851383, 31852574, 31854692, 31855526 31860193, 31862359, 31863118, 31866141, 31867037, 31869601, 31871692 …….. Patch 29340594 : applied on Thu Mar 04 17:48:17 CST 2021 Unique Patch ID: 24005319 Patch description: "DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)" Created on 8 Jan 2021, 01:44:40 hrs PST8PDT Bugs fixed: 31862202, 31554751, 31547458 [oracle@rac02 ~]$ sqlplus -v SQL*Plus: Release 19.0.0.0.0 - Production Version 19.10.0.0.0 [grid@rac02 ~]$ sqlplus -v SQL*Plus: Release 19.0.0.0.0 - Production Version 19.10.0.0.0 ``` ## 十一、升级OJVM ### 11.1 停服 ```bash [oracle@rac01 ~]$ srvctl stop instance -d orcl -i orcl1 [oracle@rac02 ~]$ srvctl stop instance -d orcl -i orcl2 ``` ### 11.2 解压 ```bash [root@rac01 tmp]# su - oracle [oracle@rac01 tmp]$ unzip -d /tmp/ /u01/p32067171_190000_Linux-x86-64.zip [oracle@rac02 tmp]$ unzip -d /tmp/ /u01/p32067171_190000_Linux-x86-64.zip ``` ### 11.3 校验 ```bash [oracle@rac01 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph /tmp/32067171/ [oracle@rac02 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph /tmp/32067171/ ``` ### 11.4 升级 > 一个节点一个节点的升级 > > ```bash > [oracle@rac01 ~]$ $ORACLE_HOME/OPatch/opatch apply /tmp/32067171/ > [oracle@rac01 ~]$ $ORACLE_HOME/OPatch/opatch apply /tmp/32067171/ > ``` ### 11.5 Postinstallation ```bash # 1.Starting the Database for Post Installation Steps in an Oracle RAC Environment # If following the Oracle RAC Rolling approach as described in Note 2217053.1, STARTUP UPGRADE is not required. # On only one node, execute the following steps to start an Oracle RAC database in startup upgrade mode: sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> alter system set cluster_database=false scope=spfile; SQL> exit $ORACLE_HOME/bin/srvctl stop database -d orcl sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP UPGRADE #2.Restarting the Database after Running the Post Installation Steps in an Oracle RAC Environment # To start the database back in normal mode sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> alter system set cluster_database=true scope=spfile; SQL> SHUTDOWN $ORACLE_HOME/bin/srvctl start database -d orcl #3.After installing the SQL portion of the patch, some packages could become INVALID. This will get recompiled upon access or you can run utlrp.sql to get them back into a VALID state. # 如果有无效记录,运行脚本即可 SQL> SELECT owner, object_name FROM dba_objects WHERE status = 'INVALID'; no rows selected cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> @utlrp.sql SQL> select patch_id,action,status from dba_registry_sqlpatch; [oracle@rac01 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.2.0.1.24 Copyright (c) 2021, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.24 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch2021-03-07_23-04-57PM_1.log Lsinventory Output file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2021-03-07_23-04-57PM.txt -------------------------------------------------------------------------------- ``` 最后修改:2022 年 04 月 07 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏