I have installed Oracle 11gR2 and want to connect with SQL*Plus but I can't.
I login in as root and then switch user to oracle as
su oracle
I have added required Oracle environment variables in .bash_profile but it is not executed when i switch to oracle user from root. Even executing the bash file manually does not export the variables using following command
$ ./.bash_profile
These are the contents of my .bash_profile:
#!/bin/bash 
#.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi
# User specific environment and startup programsotp
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP 
TMPDIR=$TMP; export TMPDIR 
ORACLE_HOSTNAME=orcl.genie.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME 
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE 
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME 
ORACLE_SID=orcl; export ORACLE_SID 
ORACLE_TERM=xterm; export ORACLE_TERM 
PATH=$ORACLE_HOME/bin:/usr/sbin:$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 
umask 022
 
    