Before using certain tools that access the Oracle database, such as SQL*Plus, you must configure environment variables for your operating system. These environment variables are used by Oracle Database to determine the database instance to which the tool should connect.
To configure operating system environment variables for your database instance on Linux and UNIX systems:
Open an operating system command window.
Ensure that the environment variables
ORACLE_SID are set properly. The commands to use to set these environment variables depend on the shell you use to interface with the operating system. For example:
(bash or ksh)
(csh or tcsh)
setenv ORACLE_SID orcl
You can set these with the scripts
coraenv (for the C shell) and
oraenv (for other shells). These scripts are typically located in the
Ensure that the
$ORACLE_HOME/bin directory is in your
PATH environment variable.
You can also edit the profile file for your default shell in the home directory of the software owner, for example
/home/oracle, so that these environment variables are set every time you log in as that user.
To configure operating system environment variables for your database instance on Windows systems:
regeditor the Oracle Administration Assistant for Windows to make sure the
ORACLE_SIDparameters are set to the correct values in the
%ORACLE_HOME%\bindirectory is in your
PATHenvironment variable. At a command prompt, use a command similar to the following:
Oracle Database Administrator's Reference for Linux and UNIX-Based Operating Systems for more information about setting environment variables
Oracle Database Platform Guide for Microsoft Windows for details on modifying the registry entries