Setting the Oracle environment variables for the database server (Linux)

After you install the Oracle database server software, you must set the Oracle environment variables on the OpenPages® database server computer.

About this task

The following table lists the environment variables required for Linux® operating systems.

Table 1. Oracle environment variables (Linux)

Environment variables

Description

ORACLE_SID

Specifies the database service name.

Restriction: The SID is case-sensitive in Linux environments.

ORACLE_HOME

Specifies the installation location or top-level directory structure for the database installation.

NLS_LANG

Specifies the database character set that is configured during the database installation. The default value is AMERICAN_AMERICA.AL32UTF8

Note: To display non-English characters for Japanese locales, set the variable to the following value: NLS_LANG=JAPANESE_JAPAN.JA16SJISTILDE

TNS_ADMIN

Specifies the location of the tnsnames.ora file. The default location is the <ORACLE_HOME>/network/admin directory.

Procedure

  1. Log on to the database server as a user with administrative privileges.
  2. Open the user profile, and set the ORACLE_SID, NLS_LANG, ORACLE_HOME, and TNS_ADMIN variables.
    Important: Use the syntax and delimiters that are appropriate for the shell that you are using.

    For example:

    export ORACLE_SID=OP
    export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    export ORACLE_HOME=/home/oracle/app/oracle/product/19.3.0/dbhome_1
    export TNS_ADMIN=$ORACLE_HOME/network/admin
  3. Append the location of ORACLE_HOME/bin to the PATH environment variable.

    For example:

    export PATH=$ORACLE_HOME/bin:$PATH
  4. Refresh the profile.

    For example, open a shell and run the following command:

    . /home/oracle/.bash_profile