10g安装出现oraInventory目录问题
来源:互联网 发布:wp软件怎么打开 编辑:程序博客网 时间:2024/06/04 22:00
- 问题背景
因之前安装过数据库11.2.0.1.0和11.2.0.3.0数据库,在环境变量倒换之间出现错误,通过kill进程的方法删除了数据库。然后删除了datafile等文件。在第二次安装的时候,出现如下情况
[oracle@aisms]./runInstaller
You do not have sufficient permissions to access the inventory '/data/oracle/oraInventory3/logs'. Installation cannot continue. Make sure that you have read/write permissions to the inventory directory and restart the installer.: Permission denied
You do not have sufficient permissions to access the inventory '/data/oracle/oraInventory3/logs'. Installation cannot continue. Make sure that you have read/write permissions to the inventory directory and restart the installer.: Permission denied
之前的环境变量情况为:
$ORACLE_BASE=/data/oracle
$ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3.0
$ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3.0
- 问题分析:
来看看oraInventory目录的介绍
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.
Ensure that you back it up regularly.
Do not delete this directory unless you have completely removed
all Oracle software from the system.
[root@ocmserver]more oraInst.loc
inventory_loc=/opt/oracle/oraInventory
inst_group=oinstall
[root@ocmserver]
inventory_loc=/opt/oracle/oraInventory
inst_group=oinstall
[root@ocmserver]
- oraInventory知识拓展:
轻易不要删除oraInventory目录,如果在生产环境删除,则会出现各种错误。常见错误总结如下:
example1
$opatch lsinventory
Invoking OPatch 10.2.0.4.3
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
Invoking OPatch 10.2.0.4.3
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
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
$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$
$./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$
$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.
$./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.
实验证明
实验一:修改默认oraInventory目录为oraInventory_bak目录,启动数据库,然后运行升级程序。
[oracle@ocmserver]mv oraInventory oraInventory_bak
[oracle@ocmserver]ls
admin bak flash_recovery_area oradata sql
archive_log core oraInventory_bak product sqlnet.log
[oracle@ocmserver]sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 28 22:21:35 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 230686720 bytes
Fixed Size 2019768 bytes
Variable Size 104861256 bytes
Database Buffers 117440512 bytes
Redo Buffers 6365184 bytes
Database mounted.
Database opened.
SQL> !
bash-3.2$ cd /opt/oracle/product/10.2.0.1/OPatch
bash-3.2$ ./opatch lsinventory
Invoking OPatch 10.2.0.1.0
Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/10.2.0.1
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/10.2.0.1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /opt/oracle/product/10.2.0.1/oui
Log file location : /opt/oracle/product/10.2.0.1/cfgtoollogs/opatch/opatch-2012_Nov_28_22-26-47-CST_Wed.log
LsInventory Session 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 72
bash-3.2$
[oracle@ocmserver]ls
admin bak flash_recovery_area oradata sql
archive_log core oraInventory_bak product sqlnet.log
[oracle@ocmserver]sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 28 22:21:35 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 230686720 bytes
Fixed Size 2019768 bytes
Variable Size 104861256 bytes
Database Buffers 117440512 bytes
Redo Buffers 6365184 bytes
Database mounted.
Database opened.
SQL> !
bash-3.2$ cd /opt/oracle/product/10.2.0.1/OPatch
bash-3.2$ ./opatch lsinventory
Invoking OPatch 10.2.0.1.0
Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/10.2.0.1
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/10.2.0.1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /opt/oracle/product/10.2.0.1/oui
Log file location : /opt/oracle/product/10.2.0.1/cfgtoollogs/opatch/opatch-2012_Nov_28_22-26-47-CST_Wed.log
LsInventory Session 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 72
bash-3.2$
SQL> !
bash-3.2$ more /var/opt/oracle/oraInst.loc
inventory_loc=/opt/oracle/oraInventory_bak
inst_group=oinstall
bash-3.2$ more /opt/oracle/product/10.2.0.1/oraInst.loc
inventory_loc=/opt/oracle/oraInventory_bak
inst_group=oinstall
bash-3.2$./opatch lsinventory
Invoking OPatch 10.2.0.1.0
Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/10.2.0.1
Central Inventory : /opt/oracle/oraInventory_bak
from : /opt/oracle/product/10.2.0.1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /opt/oracle/product/10.2.0.1/oui
Log file location : /opt/oracle/product/10.2.0.1/cfgtoollogs/opatch/opatch-2012_Nov_28_22-36-55-CST_Wed.log
Lsinventory Output file location : /opt/oracle/product/10.2.0.1/cfgtoollogs/opatch/lsinv/lsinventory-2012_Nov_28_22-36-55-CST_Wed.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 10g 10.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.
bash-3.2$
bash-3.2$ more /var/opt/oracle/oraInst.loc
inventory_loc=/opt/oracle/oraInventory_bak
inst_group=oinstall
bash-3.2$ more /opt/oracle/product/10.2.0.1/oraInst.loc
inventory_loc=/opt/oracle/oraInventory_bak
inst_group=oinstall
bash-3.2$./opatch lsinventory
Invoking OPatch 10.2.0.1.0
Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /opt/oracle/product/10.2.0.1
Central Inventory : /opt/oracle/oraInventory_bak
from : /opt/oracle/product/10.2.0.1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /opt/oracle/product/10.2.0.1/oui
Log file location : /opt/oracle/product/10.2.0.1/cfgtoollogs/opatch/opatch-2012_Nov_28_22-36-55-CST_Wed.log
Lsinventory Output file location : /opt/oracle/product/10.2.0.1/cfgtoollogs/opatch/lsinv/lsinventory-2012_Nov_28_22-36-55-CST_Wed.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 10g 10.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.
bash-3.2$
由此可知,$ORACLE_HOME/oraInst.loc文件和/var/opt/oracle/oraInst.loc应该是映射关系,在数据库启动的时候修改$ORACLE_HOME目录下的oraInst.loc,当卸载数据库的时候($ORACLE_HOME,$ORACLE_BASE被删除)可以修改/var/opt/oracle/oraInst.loc文件。
本文出自 “Focus on Oracle” 博客,请务必保留此出处http://alexy.blog.51cto.com/6115453/1073510
- 10g安装出现oraInventory目录问题
- oraInventory 目录在oracle安装中的作用
- oraInventory目录的手动指定
- oracle 10g安装过程出现的问题
- 安装oracle 10g r2出现的问题汇总
- WIN7下安装oracle 10g容易出现的问题
- 解决win7下安装oracle 10g出现蓝屏问题
- oracle 11g安装出现的问题
- 10g在linux 4上安装出现写入目录错误!!
- windows下安装oracle 10g 出现检查网络配置需求未通过问题的解决
- WIN7旗舰版下安装oracle 10g容易出现的问题
- Oracle 10g安装问题
- Win7安装Oracle 11g出现的问题与解决方法
- Win7安装Oracle 11g出现的问题与解决方法
- Oracle 10g安装时出现Configuration Assistant安装失败
- 安装oraInventory和使用opatch给Oracle打补丁
- Linux Oracle 10g 安装问题集
- centos 6.2 安装 oracle 10g 问题
- 10g的sqlplus区分大小写问题
- 10g直接删除数据文件后的启动
- 10g配置isqlplus
- 10g启动归档模式及报ORA-00265错处理
- solaris10出现crontab无法正常编辑问题
- 10g安装出现oraInventory目录问题
- solaris10下shell常用
- c与c#数据类型对应关系
- solaris10中wuftp配置小实验
- solaris10限制用户访问其他目录
- 11g数据导入10g数据库方法实现
- 10g数据导入9i数据库方法实现
- oerr的用法
- solaris10的系统常用检查命令