[转]sqlplus /nolog 出错解决 SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
http://techxploration.blogspot.com/2012/01/resolving-sp2-0750-you-may-need-to-set.html
Resolving SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
$ sqlplus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
/u01/app/oracle/product/11.2.0/xe/
If you have a different set up, adjust your directory path accordingly.
bash-3.2$ which sqlplus
/u01/app/oracle/product/11.2.0/xe/bin/sqlplus
2) Set your Oracle_HOME (upto xe directory)
bash-3.2$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/
bash-3.2$ export PATH=/u01/app/oracle/product/11.2.0/xe/bin:$PATH
You should now be able to use sqlplus.
4) Now you need to edit you bash_profile so all these takes effect everytime you log in.
bash-3.2$ cd ~/
bash-3.2$ vim .bash_profile
5) In the .bash_profile you will need to add those export lines so every time you log in the same settings take effect.
bash-3.2$ vim .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_SID=XE
export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
unset USERNAME
6) Run the following:
bash-3.2$ . .bash_profile
After following these 6 steps you should be able to connect to sqlplus any time.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步