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
jcob_lAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
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
0
DavidSenior Oracle Database AdministratorCommented:
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
0
slightwv (䄆 Netminder) Commented:
dvz,

That's a little long for you to catch me typing...
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

jcob_lAuthor Commented:
[oracle@server1 ~]$ vi~./profile
bash: vi~./profile: No such file or directory
[oracle@server1 ~]$
0
slightwv (䄆 Netminder) Commented:
>>vi~./profile

That was not what I posted:
vi ~/.profile
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
johnsoneSenior Oracle DBACommented:
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.
0
DavidSenior Oracle Database AdministratorCommented:
slight, regrets, your answer wasn't there when I posted.  I can't explain the lag.
0
jcob_lAuthor Commented:
yes
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.