Significance of oraInst.loc When Installing Oracle Products and Applying Patches
Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.3
Oracle Application Server 10g Enterprise Edition - Version: 10.1.2.0.0
Information in this document applies to any platform.
Goal
You are planning to apply one-off Patch or you are planning to install the latest Patchset
and the oraInst.loc (Oracle Inventory Pointer) is not located in /var/opt/oracle or /etc.
How to tell OPatch or the OUI (Oracle Universal Installer) where to find the oraInst.loc file?
Solution
Central Inventory
-----------------
Central Inventory contains the information relating to all Oracle products
installed on a host. Central inventory(oraInventory) is an inventory that
lists ORACLE_HOMEs installed in the system using the inventory.xml file.
Each central inventory consists of a file called inventory.xml, which
contains the list of Oracle Homes installed.
Local Inventory
---------------
Oracle home inventory or local inventory is present inside each Oracle home.
It contains information relevant to the particular Oracle home only.
This inventory contains, among other things, a file called comps.xml,
which contains all the components as well as patchsets or interim patches
installed in the ORACLE_HOME.
To determine where oraInventory is created, opatch needs to read
/var/opt/oracle/oraInst.loc or /etc/oraInst.loc depending upon the Platform.
The contents of oraInst.loc file will look something like this..
(this is an example)
inventory_loc=/oracle/product/oraInventory
inst_group=dba
--> inventory_loc tells opatch wherhe oraInventory is located
--> inst_group = Oracle installation group
(This is the group that was specified while installing the software say 10.2.0.1)
By default, opatch searches /var/opt/oracle/oraInst.loc or /etc/oraInst.loc
If oraInst.loc does not exist or was not created in /var/opt/oracle or /etc, you need
to tell opatch where to find oraInventory
For example
$ opatch apply -invPtrLoc
/oraInst.loc
$ opatch lsinventory -invPtrLoc
/oraInst.loc
For example, if the oraInst.loc file resides in $ORACLE_HOME,
then commands that you need to use will be;
$ opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc
$ opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc
$ ./runInstaller -invPtrLoc $ORACLE_HOME/oraInst.loc
(If you want to Install something into the existing Home)
在安装oracle产品和申请补丁时,oraInst.loc的重要性
应用:
Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.3
Oracle Application Server 10g Enterprise Edition - Version: 10.1.2.0.0
本文档的信息可以运用到任何平台
目标
在计划申请临时补丁或者安装最新补丁集的时候,oraInst.loc不在/var/opt/oracle or /etc
如何告诉OPatch 或者OUI在哪找到oraInst.loc 文件?
解决方案
主要内存
-----------------
主要内存包含所有和安装在本地的oracle产品相关的信息。主要内存能使用 inventory.xml文件列出安装在系统里的ORACLE_HOMEs清单。每个主要内存包含一个叫做 inventory.xml 的文件,该文件包含安装Oracle Homes的列表
本地内存
---------------
本地内存在每个 Oracle home里面。它包含只和特别的Oracle home相关的信息,此外,还包括一个叫做comps.xml的文件,该文件包含所有和中间补丁一样的组件
为了判断oraInventory创建在哪, opatch需要根据平台阅读/var/opt/oracle/oraInst.loc or /etc/oraInst.loc
oraInst.loc 文件的内容看上去就像这样:
inventory_loc=/oracle/product/oraInventory
inst_group=dba
--> inventory_loc tells opatch wherhe oraInventory is located
--> inst_group = Oracle installation group
(安装软件所指定的组)
默认情况下,opatch 搜索 /var/opt/oracle/oraInst.loc 或者 /etc/oraInst.loc
如果oraInst.loc不存在,或者没有被创建在/var/opt/oracle or /etc,则需要告诉opatch在哪可以找到oraInventory
例如
$ opatch apply -invPtrLoc
/oraInst.loc
$ opatch lsinventory -invPtrLoc
/oraInst.loc
例如:如果 oraInst.loc 文件存在于$ORACLE_HOME,那么将使用以下指令:
$ opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc
$ opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc
$ ./runInstaller -invPtrLoc $ORACLE_HOME/oraInst.loc