Operating System - HP-UX
1752749 Members
5171 Online
108789 Solutions
New Discussion юеВ

how to set oracle environment variables

 
sowmya k
New Member

how to set oracle environment variables

Am not getting how and where to set the environment variable. Please.... let me know
7 REPLIES 7
Mark McDonald_2
Trusted Contributor

Re: how to set oracle environment variables

sowmya k
New Member

Re: how to set oracle environment variables

this is the error message am getting when i run the command ./sqlplus

Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Does any one know?
Suraj K Sankari
Honored Contributor

Re: how to set oracle environment variables

HI,
Copy oracle user's .profile from other server into this server and edit as per required.

Suraj
sowmya k
New Member

Re: how to set oracle environment variables

am not having any other server. Is there any other way to get it.
Frank de Vries
Respected Contributor

Re: how to set oracle environment variables

I always create my own env file and source it when I needed it

2 prerequisites:
1) to use . oraenv
oraenv should be located in your /usr/local/bin
2) To use /etc/oratab
P01:/usr/oracle/product/10.2:Y

then login as your oracle user and run
create and run you source file:

so vi ora_env.src
PATH=/usr/local/bin:$PATH
export PATH

ORACLE_SID=P01
ORAENV_ASK=NO

export ORACLE_SID ORAENV_ASK
. oreanv
ORAENV_ASK=YES
print -u1 "Your env is $ORACLE_HOME for $ORACLE_SID"

:wq!

# . ora_env

(so the dot and the space after it are deliberate, this inserts the variables in your current session)

If you need more help let us know,

F.
Look before you leap
T G Manikandan
Honored Contributor

Re: how to set oracle environment variables

sowmya,

you need to set these environmental variables with the unix user's profile file.

It should be .profile if you are using sh or ksh.

It should contain,

ORACLE_HOME=<...>
ORACLE_SID=<...>
NLS_LANG=<...>
PATH=$PATH:$ORACLE_HOME/bin

etc..
Taifur
Respected Contributor

Re: how to set oracle environment variables