打补丁时重建Inventory目录

11G查询补丁有如下报错


[oracle@wdb ~]$ $ORACLE_HOME/OPatch/opatch lsinventory

Oracle Interim Patch Installer version 11.2.0.3.12

Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /wdb/db/product/11.2.0/dbhome_1

Central Inventory : /wdb/oraInventory

   from           : /wdb/db/product/11.2.0/dbhome_1/oraInst.loc

OPatch version    : 11.2.0.3.12

OUI version       : 11.2.0.4.0

Log file location : /wdb/db/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2018-07-20_10-21-06AM_1.log

OPatch failed to locate Central Inventory.

Possible causes are:

    The Central Inventory is corrupted

    The oraInst.loc file specified is not valid.

LsInventorySession failed: OPatch failed to locate Central Inventory.

Possible causes are:

    The Central Inventory is corrupted

    The oraInst.loc file specified is not valid.

OPatch failed with error code 73




解决方法,按如下两步一步步来

1

cat /wdb/db/product/11.2.0/dbhome_1/oraInst.loc

inventory_loc=/wdb/oraInventory

inst_group=dba

发现没有/wdb/oraInventory目录,手工建立并授权

mkdir -p /wdb/oraInventory

chown dba.oracle /wdb/oraInventory


2

cd $ORACLE_HOME/oui/bin

./attachHome.sh

请使用浏览器的分享功能分享到微信等