Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting environnement variable on UNIX

Status
Not open for further replies.

tovohery

Technical User
Jul 25, 2006
45
What is the file to edit to set the environnement variable on AIX 5.3

Regards
 
As Khalid says. Also /etc/profile and $HOME/.profile for users. Which environment variable(s)?

All I ask of you
Is make my wildest dreams come true
 
There was no environment variable set in this directory. So, my problem is that i want to set the ORACLE_HOME directory because if I was running the command
$sqlplus 'connect as sysdba' I receive the following message ksh: sqlplus: not found.
How to resolve this?

Regards
 
you should set the .profile in the oracle user home directory!
 
Just add this line in .profile if your shell is ksh otherwise if it is csh then add it in .login file under oracle home directory:

export ORACLE_HOME=/ora0/app/oracle/product/8.1.7

Regards,
Khalid
 
=/ora0/app/oracle/product/8.1.7

This part is of course dependent on where your ORACLE_HOME is, and which version of Oracle you're using. You'll also probably need to export $ORACLE_SID=<Sid of database>

All I ask of you
Is make my wildest dreams come true
 
Ok this is my environnement variable
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
export ORACLE_BASE=/data1/oracle/product
export ORACLE_HOME=/data1/oracle/product/9.2.0
export ORACLE_SID=xxx
export LB_LIBRARY_PATH=/usr/bin:$ORACLE_HOME/lib
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:$ORACLE_HOME/bin
export PATH

Why I can't run the command
$sqlplus 'connect as sysdba'

Regards

 
As user oracle what does which sqlplus show you? Is oracle a member of the dba group?

All I ask of you
Is make my wildest dreams come true
 
This is the oracle .profile in our machine

Code:
#
if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.
#
export DISPLAY=:0.0
export TMOUT=20000
export ORACLE_TERM=ncd
export LIBPATH=$ORACLE_HOME/lib
export PATH=/usr/ccs/bin:$ORACLE_HOME/bin:/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin
export TEMP=/ora0/app/oracle/TMPDIR
export TMP=/ora0/app/oracle/TMPDIR
export tmp=/ora0/app/oracle/TMPDIR
#
export TMPDIR=/ora0/app/oracle/TMPDIR
export LINK_CNTRL=L_PTHREADS_D7
#
#
export ORA_CSM_MODE=line
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
export ORACLE_BASE=/ora0/app/oracle
export ORACLE_DOC=$ORACLE_BASE/doc
export ORACLE_PATH=.:$ORACLE_HOME/bin:$ORACLE_HOME/obackup/bin:/opt/bin:/bin:/usr/bin:GNU/bin/make:/usr/ccs/bin
#
case $PATH in
        *$ORACLE_HOME/bin*) ;;
        *:) PATH=$PATH$ORACLE_HOME/bin ;;
        *)  PATH=$PATH:ORACLE_HOME/bin ;;
esac
#
export PATH=$PATH:/usr/tspf12:/usr/lbin:/opt/bin:usr/ccs/bin:GNU/bin/make
#

I hope this helps

Cheers
 
Did you source your .profile after you made the changes to it?

from the users home directory:

Code:
. .profile

Regards,
Chuck
 
Ok I see the problem. So if i login with su command i can' run this command sqlplus.

Regards
 
ok good you solved it coz i just discovered that the .profile i posted there is not the right oracle .profile! Sorry :)

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top