ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 关于oracle的相关文件及目录的解读(原)

关于oracle的相关文件及目录的解读(原)

原创 Linux操作系统 作者:流浪的野狼 时间:2013-10-23 14:36:39 0 删除 编辑

/etc/oratab文件:
该文件看其中的内容就知道是怎么回事了,此外我们可以将手动创建的数据库信息添加到该文件中,此时通过dbca就可以看到我们手动创建的数据库了
# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form.:
#   $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM2:/u01/ora10g/product/10.2.0/db_1:N
RACDB:/u01/ora10g/product/10.2.0/db_1:N

/etc/oraInst.loc文件:
该文件记录oraInventory的信息
[root@RAC02 etc]# cat oraInst.loc
inventory_loc=/u01/ora10g/oraInventory
inst_group=oinstall

关于oraInventory 目录在Oracle安装中的作用
默认情况下该目录会在$ORACLE_BASE/oraInventory,但是我们也可以通过更改/etc/oraInst.loc文件来指定具体的路径:
假设想修改该目录的路径可以修改oraInst.loc 文件
在linux下:
该文件路径为/etc/oraInst.loc
在hpunix下:
该文件路径为/var/opt/oracle/oraInst.loc
You all might be familiar with oraInventory & its importance so lets take a look at few common things about it like binary/xml inventory, What to do if Inventory is corrupted , What is global / Local Inventory and where to find documentation related to oraInventory .

What is oraInventory ?
oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format & called as binary Inventory.
There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory.
oraInventory中的内容如下:
[oracle@RAC01 ora10g]$ cd $ORACLE_BASE/
[oracle@RAC01 ora10g]$ ls
admin  backup  oraInventory  product
[oracle@RAC01 ora10g]$ cd oraInventory
[oracle@RAC01 oraInventory]$ ls
Contents          logs                     orainstRoot.sh
ContentsXML       oraInstaller.properties  oui
install.platform  oraInst.loc              sessionContext.ser

Global Inventory ?
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory Please note if you have multiple global Inventory on machine check all oraInventory directories)

You will see entry like
HOME NAME=”ORA10g_HOME” LOC=”/u01/oracle/10.2.0/db” TYPE=”O” IDX=”1″/

Local Inventory
Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.

Can I have multiple Global Inventory on a machine ?
Quite common questions is that can you have multiple global Inventory and answer is YES you can have multiple global Inventory but if your upgrading or applying patch then change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well.

What to do if my Global Inventory is corrupted ?
No need to worry if your global Inventory is corrupted, you can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option
-attachHome

./runInstaller -silent -attachHome -invPtrLoc $location_to_oraInst.loc
ORACLE_HOME=”Oracle_Home_Location” ORACLE_HOME_NAME=”Oracle_Home_Name”
CLUSTER_NODES=”{}”

Do I need to worry about oraInventory during oracle Apps 11i cloning ?
No, Rapid Clone will update both Global & Local Inventory with required information , you don’t have to worry about Inventory during Oracle Apps 11i cloning.
Inventory解析参考自:http://www.linuxidc.com/Linux/2013-09/89924.htm

关于ocr.loc文件:

该文件是在ORACLE RAC中使用的配置文件,用于巨鹿oracle rac的cor位置信息:

ocrconfig_loc=/dev/raw/raw1
local_only=FALSE

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28612416/viewspace-774879/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-04-10

  • 博文量
    151
  • 访问量
    1525237