Cannot get ORAENV to work

I am setting up a test database on a Linux server.
I have ORAENV_ASK=NO set in my .profile from my login directory.
I also have the following line in my /etc/oratab
TEST:/u001/home/oracle/product/10.2.0:Y

When I run oraenv TEST it will still prompt me to enter ORACLE_SID and ORACLE_HOME.

I thought if I passed the ORACLE_SID in the command it would find the HOME in the oratab and set both variables and the path

What am I doing wrong?
TOWELLRAsked:
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.

joebednarzCommented:
If I remember correctly, oraenv does not accept a parameter, it operates in one of two ways:

1) fully interactive, it will ask you the ORACLE_SID and ORACLE_HOME (which is what it is doing to you)
or
2) with ORACLE_SID set, oraenv sets the ORACLE_HOME

In the "as-is" script, this to me has always been half-thought out by Oracle, and I would have written the script to perform as you specified... but unfortunately, they didn't ask me first :)
0
sdstuberCommented:
Try this...

export ORACLE_SID=TEST
export ORAENV_ASK=NO
.  /usr/local/bin/oraenv 2>/dev/null
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
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.