dplinnane
asked on
Bash sqlplus command not found Oracle 10g linux v3
I have insatlled redhat linux v3 and oracle 10g. The insatllation seemed to go ok now I am trying to get sqlplus working but get the following error. Bash sqlplus command not found
I have added the following to .bash_profile, however When I do echo $ORACLE_HOME I get nothing returned, I had to run
the following as oracle user $export ORACLE_HOME=/product/oracl e/10.1.0
Not sure why I had to run manually. Anyway I must be doing something wrong no sqlplus?
I have the following in home/oracle/.bash_profile
and I also ran them as Oracle user. I get $ /product/oracle/10.1.0 Am I missing something?
# .bash_profile
ORACLE_HOME=/product/oracl e/10.1.0; export ORACLE_HOME ORACLE_BASE=/product/oracl e/admin; export ORACLE_BASE LD_LIBRARY_PATH=$ORACLE_HO ME/lib:/li b:/usr/lib :/usr/loca l/lib; export LD_LIBRARY_PATH PATH=$PATH:$ORACLE_HOME/bi n; export PATH
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#commet out below MAy10 2005
#PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
~
I have added the following to .bash_profile, however When I do echo $ORACLE_HOME I get nothing returned, I had to run
the following as oracle user $export ORACLE_HOME=/product/oracl
Not sure why I had to run manually. Anyway I must be doing something wrong no sqlplus?
I have the following in home/oracle/.bash_profile
and I also ran them as Oracle user. I get $ /product/oracle/10.1.0 Am I missing something?
# .bash_profile
ORACLE_HOME=/product/oracl
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#commet out below MAy10 2005
#PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
~
#PATH=$PATH:$HOME/bin
is wrong.
Use
#PATH=$PATH:$ORACLE_HOME/b in
is wrong.
Use
#PATH=$PATH:$ORACLE_HOME/b
schwertner, he had that covered.
although in looking at that line, there's a missing semi-colon there as well:
between:
LD_LIBRARY_PATH and PATH
although in looking at that line, there's a missing semi-colon there as well:
between:
LD_LIBRARY_PATH and PATH
P.S.
the # is a commented line.
the # is a commented line.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is what I have now
ORACLE_HOME=/product/oracl e/10.1.0; export ORACLE_HOME;
ORACLE_BASE=/product/oracl e/admin; export ORACLE_BASE;
LD_LIBRARY_PATH=$ORACLE_HO ME/lib:/li b:/usr/lib :/usr/loca l/lib; export LD_LIBRARY_PATH;
PATH=$PATH:$ORACLE_HOME/bi n; export PATH;
Is .bash_profile the right file to enter this, I have seen examples where .bashrc is used and also a profile file.
The .bash_profile is located in /home/oracle
Should I use Oracle home as add directory Db_1
ORACLE_HOME=/product/oracl e/10.1.0/D b_1; export ORACLE_HOME;
ORACLE_HOME=/product/oracl
ORACLE_BASE=/product/oracl
LD_LIBRARY_PATH=$ORACLE_HO
PATH=$PATH:$ORACLE_HOME/bi
Is .bash_profile the right file to enter this, I have seen examples where .bashrc is used and also a profile file.
The .bash_profile is located in /home/oracle
Should I use Oracle home as add directory Db_1
ORACLE_HOME=/product/oracl
ASKER
Copy and past formatting issue led to them being on same lines.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is bin path /home/oracle/product/10.1. 0/Db_1/bin
so I modified .bash_profile
ORACLE_HOME=/product/oracl e/10.1.0/D b_1; export ORACLE_HOME;
When I do $echo ORACLE_HOME it gives me old HOME to get new home I have to run on coomand line
[oracle@sqa0009 bin]$ export ORACLE_HOME=/product/oracl e/10.1.0/D b_1
[oracle@sqa0009 bin]$ echo $ORACLE_HOME
/product/oracle/10.1.0/Db_ 1
[oracle@sqa0009 bin]$ sqlplus
bash: sqlplus: command not found
so I modified .bash_profile
ORACLE_HOME=/product/oracl
When I do $echo ORACLE_HOME it gives me old HOME to get new home I have to run on coomand line
[oracle@sqa0009 bin]$ export ORACLE_HOME=/product/oracl
[oracle@sqa0009 bin]$ echo $ORACLE_HOME
/product/oracle/10.1.0/Db_
[oracle@sqa0009 bin]$ sqlplus
bash: sqlplus: command not found
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Now its working had to do the following
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#commet out below MAy10 2005
~
THEN IN .bashrc
# .bashrc
export ORACLE_HOME=/home/oracle/p roduct/10. 1.0/Db_1
export ORACLE_BASE=/home/oracle/p roduct/adm in
export LD_LIBRARY_PATH=$ORACLE_HO ME/lib:/li b:/usr/lib :/usr/loca l/lib
export PATH=$PATH:$ORACLE_HOME/bi n
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#commet out below MAy10 2005
~
THEN IN .bashrc
# .bashrc
export ORACLE_HOME=/home/oracle/p
export ORACLE_BASE=/home/oracle/p
export LD_LIBRARY_PATH=$ORACLE_HO
export PATH=$PATH:$ORACLE_HOME/bi
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
ASKER
Split point sfor effort
the one after: export ORACLE_HOME
on the line:
ORACLE_HOME=/product/oracl
on a side note, there should be a script called oraenv that is installed with oracle that does all this for you. Not familiar with Linux installs so I'm not sure exactly where it gets installed.
It would go something like this:
export ORALCE_SID=<sid>
. oraenv