理解11g Oracle Base, Oracle Home and Oracle Central/Global Inventory locations

个人总结

了解一下ORACLE软件目录的安装结构,对前期安装设置可以提供一些方便.后期维护也有相应帮助.
ORCLE_BASE
在11gR1时,ORACLE_BASE这个环境变量只是建议设置,到了11gR2版本是已经是必须的了(required by law).
当第一次安装11g时,ORACLE_BASE选择顺序是
1. ORACLE_BASE 环境变量
2.Optimal Flexible Architecture 如: /u01/app/oracle
3.如果1跟2都没有设置或创建,则 ORACLE_BASE 创建到oracle用户家目录下. 如:/home/oracle/app/oracle
不是第一次安装则从OUI图形界面的下拉列表里选取,此处我用的不多.

以前的bdump,udump,cdump在11g的时候被Automatic Diagnostic Repository (ADR)取代,相应parameter参数是 diagnostic_dest.默认的ADR base跟ORACLE_BASE是一个目录.ADR home用来存放trace files, alert logs, core files, and incident information (instance specific). 一般ADR home地址结构这样:/diag/rdbms//. 如 /diag/rdbms/ORCL/inst1

ORACLE Central/Global
文档中说 oracle 安装的时候有两种 inventory. 即 Central/Global Inventory跟Local Inventory.我所理解的一个是公有存储(Central/Global Inventory)一个是私有存储(Local Inventory).公有存储放置各个产品的安装信息,安装时与安装后各软件都能看到.私有存储仅存放在自己的家目录下.如公有的oraInst.loc 文件就放置在默认的 /etc 目录下. 文档中只谈了Central/Global Inventory. Central/Global Inventory存储了ORACLE_HOME列表.
在11g安装的时候,它也有自己的创建规则.
1.如果设置了ORACLE_BASE变量,则Central/Global Inventory 是在ORACLE_BASE的上一级目录下的. 如: "$ORACLE_BASE/../oraInventory"  ( /u01/app/oraInventory)
2.如果没有ORACLE_BASE变量设置,但是已经创建了oracle OFA目录结构,并且oracle用户对此目录有写权限,则Central/Global Inventory 将创建到OFA目录下.如果没有写权限,则报错.  如: /u01/app/oraInventory
3.如果1与2都不满足条件,则Central/Global Inventory 创建到oracle用户 的家目录下.如 /home/oracle/oraInventory
4.如果不是第一次安装,则OUI用已经存在的 Central/Global Inventory目录.

ORACLE_HOME
oracle软件放置的地方,位置基于ORACLE_BASE.如:/product/11.1.0/db_1



11g Install : Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations [ID 454442.1]

 Modified 23-SEP-2011     Type BULLETIN     Status PUBLISHED 

In this Document
  Purpose
  Scope and Application
  11g Install : Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations
  References


Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.6 - Release: 11.1 to 11.1
Oracle Server - Enterprise Edition - Version: 11.2.0.0 to 11.2.0.0   [Release: 11.2 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 23-09-2011***

Purpose

Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations during 11g installation

Scope and Application

Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations during 11g installation

11g Install : Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations

Oracle Base :

For 11gR1, the ORACLE_BASE environment variable is only "recommended" but not "mandatory"; however for 11gR2 it is "mandatory".

The Oracle Base directory is the top-level directory for Oracle products installed by the same user.

During installation,
    - OUI gives an option to chose Oracle Base location (through drop down list box)
       or
    - we can create the Oracle Base directory and set the $ORACLE_BASE in the environment
       # mkdir -p /mount_point/app
       # chown -R oracle:oinstall /mount_point/app
       # chmod -R 775 /mount_point/app/

On UNIX systems, the Optimal Flexible Architecture (OFA) Naming syntax for Oracle base directory is  similar to the following:
           Syntax : /u[01-09]/app/
            Ex: "/u01/app/oracle" is an Oracle base directory created for the "oracle" user

Default Oracle Base location (displayed by OUI during installation) is based on:

  • First time 11g installation:
    1. ORACLE_BASE variable set in the environment 
    2. If OFA-compliant path ( /u[01-09]/app/ ) exists and writable by ""
          Ex: /u01/app/oracle
      The first existing and writable directory from /u01 through /u09 will be used as the default, and an app/ directory will be created underneath it.   
    3. Neither $ORACLE_BASE is set nor OFA-compliant path exists , then Oracle Base defaults to:
       "/app/"
       Ex: /home/oracle/app/oracle
  • If it is not first time 11g installation, then OUI prefill drop down in the order of :
    1. ORACLE_BASE set in the environment,
    2. the Oracle Base from the inventory that is owned by this user
    3. all Oracle Bases from the inventory that are owned by other users

In 11g, RDBMS diagnostic data (trace, alert logs) has been reorganized and is stored inside a common directory structure, the Automatic Diagnostic Repository (ADR). The location of the ADR (adr_base) is controlled by the Oracle "diagnostic_dest" parameter. Parameters background_dump_dest, core_dump_dest, user_dump_dest (in previous releases) are now deprecated and replaced by a single parameter  "diagnostic_dest" in 11g.

The default location for the ADR base will be tied to the $ORACLE_BASE environment variable.  If "diagnostic_dest" is set in the spfile, then its value will be treated as ADR base. Otherwise, ADR Base will be set to Oracle Base location.

An ADR home (adr_home) is a common directory structure that is used for storing trace files, alert logs, core files, and incident information (instance specific). An is always located under an . Address of an is: /diag/rdbms//.

   Ex : /diag/rdbms/ORCL/inst1

Oracle Central/Global Inventory

 In general, each Oracle installation contains two inventory locations
Central/Global Inventory: Directory containing info relating to all Oracle Products installed on a host. This location can be identified by Central inventory pointer (default inventory pointer) file i.e oraInst.loc in its standard location (i.e /etc or /var/opt/oracle in some UNIX flavours). Central inventory consists of a file called inventory.xml, which contains the list of OracleHome's registered/associated with this Central Inventory. User can chose the Central/Global Inventory location at the time of first oracle product installation on a host.
Local Inventory: Local inventory resides inside the 'inventory' subdirectory within each ORACLE_HOME and contain details about oracle software components installed in the Oracle Home. Local 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. Local inventory location is fixed and always resides in $ORACLE_HOME/inventory.

In this section, we are discussing about Central/Global inventory (but not Local inventory) location.

In 11g, Default Oracle Central/Global Inventory location (displayed by OUI during installation) is based on:

  • If ORACLE_BASE ( /u01/app/oracle) is set in the environment, then Oracle Central Inventory location displayed by OUI is:

         "$ORACLE_BASE/../oraInventory"  ( /u01/app/oraInventory)
  • If not, OUI uses OFA syntax as Default Location for Oracle Central Inventory Directory.

Oracle Universal Installer checks to see if you have created an OFA-compliant path in the format u[01-09]/app, such as /u01/app, and that the user running the installation has permissions to write to that path. If this is true, then Oracle Universal Installer creates the Oracle Central Inventory directory in the path /u[01-09]/app/oraInventory.

Ex: /u01/app/oraInventory

If user doesn't have writing permissions to create folder /u[01-09]/app/oraInventory then OUI errors with OUI-10033 OUI-10035.

  • If  OFA-compliant path not exists and $ORACLE_BASE is not set,  then the Oracle Central Inventory directory is placed in the home directory of the user that is performing the installation.

Ex: /home/oracle/oraInventory   (/home/oracle is home directory for "oracle" user)

  • If it is not the first time 11g installation, then OUI will use the existing Oracle Central Inventory created for the user

Oracle Home

  • Oracle Universal Installer prompts to specify the path for Oracle Home directory. The default location for Oracle Home (displayed by OUI) is also depends on Oracle Base.
       Ex: /product/11.1.0/db_1
    It also sets the correct owner, group, and permissions on it. We do not need to create this directory.


References

NOTE:881063.1 - Key RDBMS Install Differences in 11gR2

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

转载于:http://blog.itpub.net/11780477/viewspace-708189/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值