您的位置:首页 > 数据库 > Oracle

ORACLE_SID与ORACLE_HOME环境变量介绍

2015-05-06 10:53 351 查看


ORACLE_SID与ORACLE_HOME环境变量介绍  

2012-11-29 23:11:51|  分类: Oracle内部原理|举报|字号 订阅

    





下载LOFTER客户端

   对于在Unix/Linux平台下部署过Oracle数据库、或者熟悉Oracle的人来讲,或许对这两个环境变量并不陌生。

            通常情况下,ORACLE_SID这个环境变量全称Oracle System Identifier,,用于在一台服务器上标识不同的实例,默认情况下,实例名就是ORACLE_SID的值(即INSTANCE_NAME=$ORACLE_SID。当然实例名也可以不同于ORACLE_SID这个环境变量,只要在初始化参数文件里显示指定INSTANCE_NAME参数值不同于ORACLE_SID环境变量的值即可)。在UNIX/Linux平台下,该环境变量主要作用是同ORACLE_HOME这个环境变量做hash运算,得到一个唯一值,用来标识共享内存段,及SGA。下面,摘录一段TOM大师光辉著作《Expert
Oracle Database Architecture 》的原文:

              If you’re unfamiliar with the term SID or  ORACLE_SID, a full definition is called for.
The SID is a  site identifier . It and  ORACLE_HOME (where the Oracle software is installed) are hashed together in UNIX to create a unique key name for attaching an SGA. If your  ORACLE_SIDor  ORACLE_HOME is not set correctly, you’ll get the  ORACLE NOT AVAILABLE
error, since you can’t attach to a shared memory segment that is identified by this unique key. On Windows, shared memory isn’t used in the same fashion as UNIX, but the SID is still important. You can have more than one database on the same ORACLE_HOME, so
you need a way to uniquely identify each one, along with their configuration files.

            ORACLE_HOME环境变量是Oracle软件的安装路径,顺带ORACLE_BASE环境变量是Oracle软件安装的基目录。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: