Friday 2 February 2007

Oracle 10g on Linux Shell Variables required for proper operation

This is an extract from the .profile of the oracle user on a Linux machine (running SLES9) where Oracle 10g Release 2 (10.2.0.1.0) database enterprise edition is already installed. The variables required for correct operation of the database are the following
#
# Oracle Database 10g client related entries
#
export ORACLE_OWNER=oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
export LIB_PATH=$LD_LIBRARY_PATH:/usr/lib
export NLS_LANG=AMERICAN_GREECE.EL8ISO8859P7
export NLS_DATE_FORMAT='DD-MM-YYYY HH24:MI:SS'
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/ctx/bin:$ORACLE_HOME/OPatch:$PATH
export ORACLE_SID=mydb
Notes
  1. NLS_DATE_FORMAT is to allow rman display time information when listing backups
  2. NLS_LANG is to allow oracle software to display messages in a specific language (here American English), use regional settings for a specific country (Greece) and handle data encoded in a specific format (here iso8859-7).
  3. Forgetting to set the LD_LIBRARY_PATH has proved the root of many evil things
  4. The same values can also be used for installations of an oracle application server version 10.1.3.x. Just remove the $ORACLE_HOME/ctx/lib for the $LD_LIBRARY_PATH variable

No comments :