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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sdstuberConnect With a Mentor Commented:
Try this...

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

From novice to tech pro — start learning today.