inventory是oracle安装工具OUI用来管理oracle安装目录的。inventory里注册了某个ORACLE_HOME下安装的数据库的组件及其版本,存放的是oracle软件安装的目录信息。oracle数据库软件的升级、增删组件,都需要使用inventory。oracle OUI会创建一个有oraInst.ora文件指定的全局inventory。
oraInst.ora文件所在的目录:
AIX 或 linux操作系统平台:/etc/oraInst.ora
HP UNIX或Solaris操作系统平台/var/opt/oracle/oraInst.loc
oraInst.ora文件内容:
[oracle@ora11g ~]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory------oraInvetory所在目录
inst_group=oinstall-----OUI安装ORACLE的操作系统组
模拟手动创建全局inventory
模拟数据库的版本
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
删除当前的oraInventory
[oracle@ora11g app]$ mv oraInventory/ /tmp
查看当前系统状态
[oracle@ora11g OPatch]$ ./opatch lsinventory
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2013-08-05_06-18-47AM.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
生成全局inventory
[oracle@ora11g bin]$ ./attachHome.sh
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23988293/viewspace-767824/
,如需转载,请注明出处,否则将追究法律责任。