Link to home
Start Free TrialLog in
Avatar of jcob_l
jcob_l

asked on

oracle home

[oracle@server1 ~]$ cd $ORACLE_HOME
[oracle@server1 ~]$ env | grep ORACLE_HOME
[oracle@server1 ~]$


How we will set $ORACLE_HOME permanently

ie when we start next time
and type cd $ORACLE_HOME
it should go to oracle home ie  /oracle/app/oracle/product/11.2.0./db

please guide
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

If you set everything up properly and have populated your oratab file then edit your .profile:
vi ~/.profile

add the following:
export ORACLE_SID=SOME_SID
ORAENV_ASK=NO
. oraenv

Open in new window


Replace SOME_SID to a correct ORALCE_SID that you have.

If you don't have the oratab set up properly in your .profile:
export ORACLE_HOME=/oracle/app/oracle/product/11.2.0./db
If you have only one Oracle home, one solution is to hard code the value into the ORACLE_HOME variable at the start of your session.  On linux/unix, for example, you can add to your profile:

export ORACLE_HOME=/oracle/app/oracle/product/11.2.0./db
dvz,

That's a little long for you to catch me typing...
Avatar of jcob_l

ASKER

[oracle@server1 ~]$ vi~./profile
bash: vi~./profile: No such file or directory
[oracle@server1 ~]$
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Based on the message you received your login shell seems to be bash.  In that case you should modify ~/.bash_profile or ~/.bashrc not ~/.profile    Unfortunately different shells use different profile scripts.
slight, regrets, your answer wasn't there when I posted.  I can't explain the lag.
Avatar of jcob_l

ASKER

yes