# 3.2 Configuring the Operating System Environment Variables

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:

1. Open an operating system command window.

2. Ensure that the environment variables `ORACLE_HOME` and `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) `export ORACLE_SID=orcl`

• (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 `/usr/local/bin` directory.

3. Ensure that the `\$ORACLE_HOME/bin` directory is in your `PATH` environment variable.

4. 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:

1. Open an operating system command window.
2. Use either `regedit` or the Oracle Administration Assistant for Windows to make sure the `ORACLE_HOME` and `ORACLE_SID` parameters are set to the correct values in the `HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HOME_NAME` registry subkey.
3. Ensure that the `%ORACLE_HOME%\bin` directory is in your `PATH` environment variable. At a command prompt, use a command similar to the following:
```set PATH=%ORACLE_HOME%\bin;%PATH%
```