1、环境说明 OS版本:Oracle Linux 7.3 DB版本:12.2.0.1.0 64bit 数据库运行环境:RAC psu补丁程序: 26123830(12.2.0.1.170718) 注意: (1)应用PSU之前,确保磁盘至少有5G的可用空间,否则环境检查的时候会失败,提示如下 Reason: Failed during Analysis:CheckNApplyReport Failed, [ Prerequisite Status: FAILED, Prerequisite output: The details are: Failed during Analysis: CheckSystemSpaceFailed, [ Prerequisite Status: FAILED, Prerequisite output: The details are: (2)应用PSU之前,确保PSU包所属owner为grid且有775的权限,因为应用PSU过程中会切换到grid用户执行脚本。
以下实验以节点1为例,节点2同理
2、opatch 工具检查(1)grid [grid@rac01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.6 OPatch succeeded. [grid@rac01 OPatch]$ (2)oracle [oracle@rac01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.6 OPatch succeeded.
[oracle@rac01 OPatch]$
3、opatch检查(1)grid [grid@rac01 OPatch]$ ./opatch lsinv Oracle Interim Patch Installer version 12.2.0.1.6 Copyright (c) 2017, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/grid/product/12.2.0/grid Central Inventory : /u01/app/grid/oraInventory from :/u01/app/grid/product/12.2.0/grid/oraInst.loc OPatch version : 12.2.0.1.6 OUI version : 12.2.0.1.4 Log file location :/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/opatch2017-08-01_14-44-14PM_1.log Lsinventory Output file location :/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-08-01_14-44-14PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: rac01 ARU platform id: 226 ARU platform description:: Linux x86-64 Installed Top-level Products (1): Oracle Grid Infrastructure 12c 12.2.0.1.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in thisOracle Home. Patch level status of Cluster nodes : PatchingLevel Nodes -------------- ----- 0 rac01,rac02 -------------------------------------------------------------------------------- OPatch succeeded. (2)oracle [oracle@rac01 OPatch]$ ./opatch lsinv Oracle Interim Patch Installer version 12.2.0.1.6 Copyright (c) 2017, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/12.2.0/db_2 Central Inventory : /u01/app/grid/oraInventory from : /u01/app/oracle/product/12.2.0/db_2/oraInst.loc OPatch version : 12.2.0.1.6 OUI version : 12.2.0.1.4 Log file location :/u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatch/opatch2017-08-01_14-45-02PM_1.log Lsinventory Output file location :/u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatch/lsinv/lsinventory2017-08-01_14-45-02PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: rac01 ARU platform id: 226 ARU platform description:: Linux x86-64 Installed Top-level Products (1): Oracle Database 12c 12.2.0.1.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in thisOracle Home. --------------------------------------------------------------------------------
OPatch succeeded.
4、OPatch升级说明:应用该psu要求OPatch工具版本为12.2.0.1.7或更高
(1)上传最新OPatch工具 (2)备份grid_home/OPatch [grid@rac01 grid]$ mv OPatch/ OPatch.bak mv: cannot move 'OPatch/' to 'OPatch.bak':Permission denied 给grid_home增加组写的权限 [root@rac01 12.2.0]# pwd /u01/app/grid/product/12.2.0 [root@rac01 12.2.0]# ll total 4 drwxr-xr-x 85 root oinstall 4096 Jun 29 11:44 grid [root@rac01 12.2.0]# chmod g+w grid/ [root@rac01 12.2.0]# 再次备份成功 [grid@rac01 grid]$ mv OPatch/ OPatch.bak (3)解压OPatch工具到grid_home [grid@rac01 grid]$ unzip/psu/p6880880_122010_Linux-x86-64.zip (4)OPatch版本检查 [grid@rac01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.9 OPatch succeeded. [grid@rac01 OPatch]$ (5)oracle_home同理,OPatch版本如下: [oracle@rac01 OPatch]$ ./opatch version OPatch Version: 12.2.0.1.9 OPatch succeeded.
[oracle@rac01 OPatch]$ 5、上传PSU包并解压
6、应用PSU
节点1应用psu日志: [root@rac01 psu]# /u01/app/grid/product/12.2.0/grid/OPatch/opatchauto apply 26133434/ OPatchauto session is initiated at Wed Aug 2 13:54:32 2017 System initialization log file is/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2017-08-02_01-54-42PM.log. Session log file is /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2017-08-02_01-56-17PM.log The id for this session is JJCF Executing OPatch prereq operations to verify patchapplicability on home /u01/app/grid/product/12.2.0/grid Executing OPatch prereq operations to verify patchapplicability on home /u01/app/oracle/product/12.2.0/db_2 Patch applicability verified successfully on home/u01/app/grid/product/12.2.0/grid Patch applicability verified successfully on home/u01/app/oracle/product/12.2.0/db_2 Verifying SQL patch applicability on home/u01/app/oracle/product/12.2.0/db_2 SQL patch applicability verified successfully onhome /u01/app/oracle/product/12.2.0/db_2 Preparing to bring down database service on home/u01/app/oracle/product/12.2.0/db_2 Successfully prepared home/u01/app/oracle/product/12.2.0/db_2 to bring down database service Bringing down CRS service on home/u01/app/grid/product/12.2.0/grid Prepatch operation log file location:/u01/app/grid/base/crsdata/rac01/crsconfig/crspatch_rac01_2017-08-02_02-07-36PM.log CRS service brought down successfully on home/u01/app/grid/product/12.2.0/grid Performing prepatch operation on home/u01/app/oracle/product/12.2.0/db_2 Perpatch operation completed successfully on home/u01/app/oracle/product/12.2.0/db_2 Start applying binary patch on home/u01/app/oracle/product/12.2.0/db_2 Binary patch applied successfully on home/u01/app/oracle/product/12.2.0/db_2 Performing postpatch operation on home/u01/app/oracle/product/12.2.0/db_2 Postpatch operation completed successfully on home/u01/app/oracle/product/12.2.0/db_2 Start applying binary patch on home/u01/app/grid/product/12.2.0/grid Binary patch applied successfully on home/u01/app/grid/product/12.2.0/grid Starting CRS service on home /u01/app/grid/product/12.2.0/grid Postpatch operation log file location:/u01/app/grid/base/crsdata/rac01/crsconfig/crspatch_rac01_2017-08-02_02-19-46PM.log CRS service started successfully on home/u01/app/grid/product/12.2.0/grid Preparing home /u01/app/oracle/product/12.2.0/db_2after database service restarted No step execution required......... Prepared home /u01/app/oracle/product/12.2.0/db_2successfully after database service restarted Trying to apply SQL patch on home/u01/app/oracle/product/12.2.0/db_2 SQL patch applied successfully on home/u01/app/oracle/product/12.2.0/db_2 OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find thesummary as follows: Host:rac01 RAC Home:/u01/app/oracle/product/12.2.0/db_2 Summary: ==Following patches were SKIPPED: Patch: /psu/26133434/25586399 Reason: This patch is not applicable to thisspecified target type - "rac_database" ==Following patches were SUCCESSFULLY applied: Patch: /psu/26133434/26002778 Log:/u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatchauto/core/opatch/opatch2017-08-02_14-09-46PM_1.log Patch: /psu/26133434/26123830 Log:/u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatchauto/core/opatch/opatch2017-08-02_14-09-46PM_1.log Host:rac01 CRS Home:/u01/app/grid/product/12.2.0/grid Summary: ==Following patches were SUCCESSFULLY applied: Patch: /psu/26133434/26002778 Log: /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-08-02_14-11-51PM_1.log Patch: /psu/26133434/25586399 Log:/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-08-02_14-11-51PM_1.log Patch: /psu/26133434/26123830 Log:/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-08-02_14-11-51PM_1.log OPatchauto session completed at Wed Aug 2 14:42:27 2017 Time taken to complete the session 47 minutes, 57seconds [root@rac01 psu]#
|