当前坏境还没有打补丁,在检查补丁环境的时候发现如下报错
2节点补丁报错
[oracle@dbnode02 ~]$ opatch lsinv Oracle Interim Patch Installer version 12.1.0.1.3 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /oracle/app/oracle/12.1.0/dbhome_1 Central Inventory : /grid/app/oraInventory from : /oracle/app/oracle/12.1.0/dbhome_1/oraInst.loc OPatch version : 12.1.0.1.3 OUI version : 12.1.0.2.0 Log file location : /oracle/app/oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2018-05-09_15-29-24PM_1.log List of Homes on this system: Home name= OraGI12Home1, Location= "/grid/app/12.1.0/grid" Inventory load failed... OPatch cannot load inventory for the given Oracle Home. Possible causes are: Oracle Home dir. path does not exist in Central Inventory Oracle Home is a symbolic link Oracle Home inventory is corrupted LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo OPatch failed with error code 73
2节点grid补丁是ok的
[grid@dbnode02 ~]$ opatch lsinv Oracle Interim Patch Installer version 12.1.0.1.3 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /grid/app/12.1.0/grid Central Inventory : /grid/app/oraInventory from : /grid/app/12.1.0/grid/oraInst.loc OPatch version : 12.1.0.1.3 OUI version : 12.1.0.2.0 Log file location : /grid/app/12.1.0/grid/cfgtoollogs/opatch/opatch2018-05-09_15-28-26PM_1.log Lsinventory Output file location : /grid/app/12.1.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2018-05-09_15-28-26PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Grid Infrastructure 12c 12.1.0.2.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. Patch level status of Cluster nodes : Patching Level Nodes -------------- ----- 0 dbnode02,dbnode03,dbnode01,dbnode04 -------------------------------------------------------------------------------- OPatch succeeded.
其他节点的oracle补丁可以显示
[oracle@dbnode03 ~]$ opatch lsinv Oracle Interim Patch Installer version 12.1.0.1.3 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /oracle/app/oracle/12.1.0/dbhome_1 Central Inventory : /grid/app/oraInventory from : /oracle/app/oracle/12.1.0/dbhome_1/oraInst.loc OPatch version : 12.1.0.1.3 OUI version : 12.1.0.2.0 Log file location : /oracle/app/oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2018-05-09_15-28-30PM_1.log Lsinventory Output file location : /oracle/app/oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2018-05-09_15-28-30PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. Rac system comprising of multiple nodes Local node = dbnode03 Remote node = dbnode01 Remote node = dbnode02 Remote node = dbnode04 -------------------------------------------------------------------------------- OPatch succeeded.因为报错中出现了
Home name= OraGI12Home1, Location= "/grid/app/12.1.0/grid"
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
Oracle Home dir. path does not exist in Central Inventory
Oracle Home is a symbolic link
Oracle Home inventory is corrupted
所以我对比了2节点和其他节点的oracle和grid的环境变量ORACLE_HOME
发现一致后我搜索了mos
OPatch Error - 产品清单加载失败... OPatch cannot load inventory for the given Oracle Home (文档ID 2205190.1)
文中表明在需要attachhome
[oracle@dbnode02 ~]$ cd $ORACLE_HOME/oui/bin [oracle@dbnode02 bin]$ ls a addLangs.sh attachHome.sh [oracle@dbnode02 bin]$ ./attachHome.sh Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 32698 MB Passed The inventory pointer is located at /etc/oraInst.loc 'AttachHome' was successful.
再次查看的时候2节点就ok了
[oracle@dbnode02 bin]$ opatch lsinv Oracle Interim Patch Installer version 12.1.0.1.3 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /oracle/app/oracle/12.1.0/dbhome_1 Central Inventory : /grid/app/oraInventory from : /oracle/app/oracle/12.1.0/dbhome_1/oraInst.loc OPatch version : 12.1.0.1.3 OUI version : 12.1.0.2.0 Log file location : /oracle/app/oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2018-05-09_15-42-22PM_1.log Lsinventory Output file location : /oracle/app/oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2018-05-09_15-42-22PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. Rac system comprising of multiple nodes Local node = dbnode02 Remote node = dbnode01 Remote node = dbnode03 Remote node = dbnode04 -------------------------------------------------------------------------------- OPatch succeeded.