oracle环境变量详解

时间:2024-03-08 11:30:07

共享存储文件系统(NFS)

 

 

通常情况下,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软件安装的基目录。