Search This Blog

Wednesday, February 7, 2007


In Oracle Database files and programs, a question mark (?) represents the value of the ORACLE_HOME environment variable.
the @ sign represents the ORACLE_SID environment variable

Environment Variables
To display the current value of an environment variable,
$ env | more
Specifies the language, territory, and character set of the client environment
Specifies the directory where language, territory, character set, and linguistic definition files are stored.
Specifies the full path and file name of the time zone file
$ORACLE_HOME/oracore/zoneinfo/timezlrg.dat >>>> DEFAULT
Specifies the base of the Oracle directory structure for Optimal Flexible Architecture (OFA) compliant installations
Specifies the directory containing the Oracle software.
Specifies the Oracle system identifier
Enables the tracing of shell scripts during an installation
Controls whether the oraenv or coraenv script prompts for the value of the ORACLE_SID environment variable.
Value : NO or Any others.
Specifies the directory or list of directories that SQL*Plus searches for a login.sql file.
Specifies the directory containing the Oracle Net Services configuration files
Specifies the default connect identifier to use in the connect string
Any connect identifier

UNIX Environment Variables
Specifies the directory containing the Ada compiler
Used with Java applications
There is no default setting. CLASSPATH must include the following directories:
Used by X-based tools. Specifies the display device used for input and output.
where the hostname is the system name (either IP address or alias), server is the sequential code number for the server, and screen is the sequential code number for the screen. If you have a single monitor, use the value 0 for both server and screen (0.0).
Note: If you have a single monitor, screen is optional.

Example bambi:0
The user’s home directory

Used by the shell to locate executable programs; must include the $ORACLE_HOME/bin directory.
[oracle@alwarid-taj ~]$ echo $PATH

Setting a Common Environment

set a common operating system environment by using the oraenv or coraenv scripts
1.For the Bourne, Bash, or Korn shell, use the oraenv command.
2.For the C shell, use the coraenv command.

The oraenv and coraenv scripts are created during installation. These scripts set environment variables based on the contents of the oratab file and provide:


Do not call the oraenv or coraenv script from the Oracle software owner (typically oracle) user's shell startup script. Because these scripts prompt for values, they can prevent the dbstart script from starting a database automatically when the system starts.

The oraenv or coraenv script is usually called from the user's shell startup file (for example .profile or.login). It sets the ORACLE_SID and ORACLE_HOME environment variables and includes the $ORACLE_HOME/bin directory in the PATH environment variable setting.

When switching between databases, users can run the oraenv or coraenv script to set these environment variables.

[oracle@alwarid-taj /]$ su - root
[root@alwarid-taj ~]# . /usr/local/bin/oraenv
ORACLE_SID = [root] ? oracle
[root@alwarid-taj ~]#

Local bin Directory

1.When you run the script after installation, the script prompts you for the path of the local bin directory and automatically copies the oraenv, coraenv, and dbhome scripts to the directory that you specify. The default local bin directory is /usr/local/bin.

2.If you do not run the script, then you can manually copy the oraenv or coraenv and dbhome scripts from the $ORACLE_HOME/bin directory to the local bin directory.

The oraenv or coraenv script is usually called from the user's shell startup file (for example .profile or.login).

No comments: