can not start sqlplus from the shell [message #425911] |
Tue, 13 October 2009 01:09 |
tianhaoxi
Messages: 4 Registered: October 2009
|
Junior Member |
|
|
hi all:
i am newer to the oracle 11g R1
i have installed the database according to the document from the oracle on the redhat5
everything is ok
when i finished the installation, then i login in as the oracle user and open the terminal and input the "sqlplus"
i get the error the the command doesn't exist.
i descide to start the scripts from the absolute path. then i get the error below
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
i check the .bash_profile below.
i do set the path including the oracle bin path here.
now i still can not excute the oracle command from the shell directly.
can anyone give me any suggestion? thanks a lot
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oralce/product/11.1.0/db_1
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
TMP=/tmp
TMPDIR=/tmp
#ORACLE_BASE=/u01/app/oracle
#ORACLE_HOME=/u01/app/oralce/product/11.1.0/db_1
export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH PATH TMP TMPDIR
|
|
|
Re: can not start sqlplus from the shell [message #425914 is a reply to message #425911] |
Tue, 13 October 2009 01:25 |
|
Hi,
Are you trying to run sqlplus under oracle user?
Try to edit your ~oracle/.bash_profile:
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/usr/local/bin
export PATH
ORAENV_ASK=NO;
export ORACLE_SID=<SID>
. /usr/local/bin/oraenv >/dev/null
unset ORAENV_ASK
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
[Updated on: Tue, 13 October 2009 01:28] Report message to a moderator
|
|
|
|
|
Re: can not start sqlplus from the shell [message #425926 is a reply to message #425911] |
Tue, 13 October 2009 02:57 |
tianhaoxi
Messages: 4 Registered: October 2009
|
Junior Member |
|
|
thanks u sir
i have fixed it.
thank u for paste u profile file here
i just find the the installation guid of oracle on the oracle offical website does not tell me how to set the envrionment variable for oracle correctly
for ORACLE_HOME and so on.
|
|
|