一、Inventory的定义与作用

oraInventory存放的是Oracle软件安装的目录信息,Oralce的安装升级都需要用到这个目录,来看看Oracle文档中对这个目录的一点说明:
All Oracle software installations rely on this directory. 
Ensure that you back it up regularly. 
Do not delete this directory unless you have completely removed 
all Oracle software from the system.

oraInventory目录的位置是由oraInst.loc文件决定的:
/etc/oraInst.loc (AIX and Linux Platform)
/var/opt/oracle/OraInst.loc (Solaris and HP-UX platform)

$cat /etc/oraInst.loc 
inventory_loc=/app/oracle/oraInventory
inst_group=dba
删除或丢失oraInventory目录的内容,都有可能导致升级报错,例如在运行opatch时就有可能遇到以下报错:
10G中:
$opatch lsinventory
Invoking OPatch 10.2.0.4.3

整理自:

https://blog.csdn.net/caomiao2006/article/details/11901063/
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
$opatch lsinventory
Invoking OPatch 10.2.0.4.3

List of Homes on this system:

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
9I中报错:
OPATCH_JAVA_ERROR  : An exception of type "OPatchException" has occurred: 
OPatch Exception:
  Can not lock OUI inventory (READ/WRITE Level)
  An exception occurs
  The inventory pointed at location /app/oraInventory is not valid

There is no Interim Patch

Can not get a list of inventory on this home.
LsInventory: OPatch Exception while accessing O2O

OPATCH_JAVA_ERROR  : An exception of type "OPatchException" has occurred: 
OPatch Exception:
  OUI found no such ORACLE_HOME set in the environment
  Can not get details for given Oracle Home
  An exception occurs
  null

There is no Interim Patch

Can not get a list of inventory on this home.

ERROR: OPatch failed because of Inventory problem.

二、Inventory重建

1、在10G中可以运行以下命令进行oraInventory目录重建

$cd $ORACLE_HOME/oui/bin
$./runInstaller -silent -attachHome  ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="ORACLE_HOME"

Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, 
no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /app/oracle/oraInventory
'AttachHome' was successful.
js_znjh_1./app/oracle/product/10.2.0/db_1/oui/bin$

2、10.2.0.2以上的版本,还可以直接运行attachHome.sh脚本

$cd $ORACLE_HOME/oui/bin    
$./attachHome.sh

Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, 
no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /app/oracle/oraInventory
'AttachHome' was successful.

Oracle 物理结构(一) 文件-Inventory的更多相关文章

  1. ORACLE体系结构一 (物理结构)- 数据文件、日志文件、控制文件和参数文件

    一.物理结构Oracle物理结构包含了数据文件.日志文件.控制文件和参数文件 1.数据文件每一个ORACLE数据库有一个或多个物理的数据文件(data file).一个数据库的数据文件包含全部数据库数 ...

  2. Oracle 物理结构(七) 文件-归档日志文件

    Oracle 物理结构(七) 文件-归档日志文件

  3. Oracle 物理结构(六) 文件-数据文件

    Oracle 物理结构(六) 文件-数据文件

  4. Oracle 物理结构(二) 文件-口令文件

    一.口令文件作用 1.口令文件基本介绍 Oracle数据库口令文件存放有超级用户的口令及其他特殊用户的用户名/口令. 口令文件在数据库创建时,自动创建,存放在$ORACLE_HOME/dbs. 此文件 ...

  5. Oracle物理结构与逻辑结构

    有一张图能非常清晰的表示出Oracle物理结构与逻辑结构的区别:如下图:   对上图的解释:每个数据库都必须由一个或多个表空间组成.(一对多关系)每个表空间都必须由一个或多个数据文件(data fil ...

  6. 【静默】Oracle各类响应文件何在?

    [静默]Oracle各类响应文件何在? --root用户下执行: find -name *.rsp  / 1.创建数据库的响应文件:$ORACLE_HOME/assistants/dbca/dbca. ...

  7. Linux服务器磁盘扩展和oracle表空间文件迁移操作记录

    1.环境介绍 服务器硬件:Dell R710 服务器OS:红帽子Linux   RHEL4.8 数据库:Oracle 10g 2.出现的问题 因为数据表每天有上百万的数据写入表,加上建立索引,导致表空 ...

  8. oracle表分区、表分析及oracle数据泵文件导入导出开心版

    1.先说oracle表分区是什么吧,这样吧我们来举个桃子,栗子太小,我们就不举了,我们来举个桃子. 你有500万份文件,你要把他存在磁盘上,好嘛,我们就一个文件夹,500万分文件在那儿杵着,我们想找到 ...

  9. Oracle----SQL语句积累 (Oracle 导入 dmp文件)

    Oracle----SQL语句积累 (Oracle 导入 dmp文件) Oracle SQL PL  导入dum文件 1.数据库DBA权限: 注意:这个是在cmd命令行中直接输入,不需要进入Oracl ...

  10. Oracle表空间数据文件移动的方法

    最近遇到这样的一个问题,Oracle存放表空间文件的盘符 空间不够了,必须把部分表空间迁移出去, [转]http://www.jb51.net/article/77026.htm 实现把用户表空间中的 ...

随机推荐

  1. 学习Python类的心得

      类的注意事项 1)命名规则 需要注意的是,在Python中,变量名类似__xxx__的,也就是以双下划线开头,并且以双下划线结尾的, 是特殊变量,特殊变量是可以直接访问的,不是private变量, ...

  2. Python selenium常用用法

    1.获取当前页面的Url 方法:current_url 实例:driver.current_url 2.获取元素坐标 方法:location 解释:首先查找到你要获取元素的,然后调用location方 ...

  3. python学习-24 局部变量与全局变量

    局部变量与全局变量 1.没有缩进的变量,为全局变量 name = 'jphn' 在子程序里定义的变量,局部变量 2. name = 'jphn' #全局变量 def a(): name='andy' ...

  4. PAT(B) 1018 锤子剪刀布(C:20分,Java:18分)

    题目链接:1018 锤子剪刀布 分析 用一个二维数组保存两人所有回合的手势 甲乙的胜,平,负的次数刚好相反,用3个变量表示就可以 手势单独保存在signs[3]中,注意顺序.题目原文:如果解不唯一,则 ...

  5. ORA-07445: exception encountered: core dump [opiaba()+639] [SIGSEGV] [ADDR:0x0] [PC:0x1858C3F] [SI_KERNEL(general_protection)] []

    开发反馈应用无法连接数据库,发现数据库实例崩溃,且数据库为11.2.0.4 单实例. 数据库告警日志发现,数据库崩溃之前出现ORA- ORA-: exception encountered: core ...

  6. CMake入门-03-还是HelloWorld

    工作环境 系统:macOS Mojave 10.14.6 CMake: Version 3.15.0-rc4 Hello,World! 扩展-math 目录里的文件编译成静态库再由 main 函数调用 ...

  7. Mysql的实现原理

    上篇文章已经简单介绍了Mysql索引的基本介绍,这篇文章主要讲解一下所以的实现原理.索引的定义其实非常复杂,严格的定义需要用到关系代数的概念,不在咱们讨论范围内,这里咱们只讨论mysql的常用的引擎的 ...

  8. 奇妙的算法【9】YC每个小孩的糖果数,找公约数,最少硬币数

    1,每个小孩的糖果数量是多少 有p个小孩,c个糖果,刚开始第1个小孩发一个糖果,第2个小孩发两个糖果,第p个小孩发p个糖果,如果糖果没有发完,就接着[注意]第1个小孩发p+1个糖果.....第p个小孩 ...

  9. 字蛛webfont 安装及使用方法

    先安装nodejs和git,比如放在D:/nodejs/  文件夹 cmd 进入该文件夹,安装npm install express 安装 npm install font-spider -g 安装  ...

  10. css滑动门技术

    滑动门的核心技术: 为了使各种特殊形状的背景能够自适应元素中文本内容的多少,以使自由拉伸滑动 利用css精灵(主要是背景位置)和盒子padding撑开宽度,以便适应不同字数的导航栏 一般经典布局 &l ...