Aliagha
Aliagha

Reputation: 9

ORACLE_HOME: command not found

I have configured my .bash_profile as follows:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User-specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=merkez-rac1.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle;
export ORACLE_BASE GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME
DB_HOME=$ORACLE_BASE/product/11.2.0/db_1; export DB_HOME
ORACLE_HOME=$DB_HOME; export ORACLE_HOME ORACLE_SID=RAC1; export
ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

if [ "$USER" = "oracle" ]; then
    if [ "$SHELL" = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi

alias gid_env='. /home/oracle/gid_env'
alias db_env='. /home/oracle/db_env'

Problem: When I run the command in the terminal:

[oracle@merkez-rac1 ~]$ echo $ORACLE_HOME

It does not return the expected value and gives an empty output. The directory /u01/app/oracle/product/11.2.0/db_1 is not displayed.

Upvotes: 0

Views: 911

Answers (1)

L. Scott Johnson
L. Scott Johnson

Reputation: 4402

Can't tell what the question is, but if it's about ORACLE_HOME, try putting a newline in on that line:

ORACLE_HOME=$DB_HOME; export ORACLE_HOME ORACLE_SID=RAC1; export
ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM

should be

ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM

and so on

Upvotes: 0

Related Questions