重庆思庄Oracle、Redhat认证学习论坛

标题: opatch查看报错:LsInventorySession failed [打印本页]

作者: 刘泽宇    时间: 2021-6-13 09:41
标题: opatch查看报错:LsInventorySession failed
查看数据库补丁情况时opatch显示报错:
[oracle@orcl ~]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/12.2.0/db_1
Central Inventory : /u01/oraInventory
   from           : /u01/oracle/product/12.2.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.1.4
Log file location : /u01/oracle/product/12.2.0/db_1/OPatch/opatch2021-06-09_14-59-20PM_1.log

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


解决方法:
修改oraInst.loc文件配置
[oracle@orcl ~]$ more /u01/oracle/product/12.2.0/dbhome_1/oraInst.loc
#Oracle Installer Location File Location
#Mon Jun 09 14:10:42 CST 2021
inst_group=oinstall
inventory_loc=/u01/oraInventory


[oracle@wn-jbyl-db ~]$ ls -l /u01/oraInventory/
total 8
-rw-rw----. 1 oracle oinstall   56 Jun 9 14:10 oraInst.loc
-rwxrwx---. 1 oracle oinstall 1620 Jun 9 14:10 orainstRoot.sh
[oracle@wn-jbyl-db ~]$ cd $ORACLE_HOME/oui/bin

[oracle@wn-jbyl-db bin]$ ./attachHome.sh
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 32063 MB    Passed
The inventory pointer is located at /u01/oraInventory/oraInst.loc
'AttachHome' was successful.

[oracle@orcl bin]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/12.2.0/db_1
Central Inventory : /u01/oraInventory
   from           : /u01/oracle/product/12.2.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.1.4
Log file location : /u01/oracle/product/12.2.0/db_1/OPatch/opatch2021-06-09_14-59-20PM_1.log


Lsinventory Output file location : /u01/oracle/product/12.2.0/db_1/OPatch/lsinv/lsinventory2019-09-02_15-03-28PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: orcl
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 this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.








欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2