bash:sqlplus:commandnotfound解决方法
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了bash:sqlplus:commandnotfound解决方法,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2245字,纯文字阅读大概需要4分钟。
内容图文
![bash:sqlplus:commandnotfound解决方法](/upload/InfoBanner/zyjiaocheng/563/f36f420371c44555b401bf238db0ca45.jpg)
bash: sqlplus:command not found 解决方法(一) 环境变量已经配好,但是仍报错: [oracle@dg1 ~]$ vi .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup p
bash: sqlplus:command not found 解决方法(一)
环境变量已经配好,但是仍报错:
[oracle@dg1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export EDITOR=vi
export ORACLE_SID=dg1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
exportPATH=/u01/app/oracle/product/10.2.0/db_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export PATH=$ORACLE_HOME/bin:$PATH
umask 022
解决方法:
[oracle@dg1 ~]$ sqlplus /nolog
bash: sqlplus: command not found
[oracle@dg1 ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
ln: creating symbolic link `/usr/bin/sqlplus' to `/bin/sqlplus': Permissiondeni ed
[oracle@dg1 ~]$ su - root
Password:
[root@dg1 ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
[root@dg1 ~]# su - oracle
[oracle@dg1 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May11 12:51:24 2009
Copyright (c) 1982, 2005, Oracle. All rightsreserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
FixedSize 1218316 bytes
VariableSize 79694068 bytes
Database Buffers 83886080 bytes
RedoBuffers 2973696 bytes
Database mounted.
Database opened.
SQL>
bash: sqlplus: command not found解决方法(二)
环境变量:
[oracle@ocmdb2~]$ cat .bash_profile
# .bash_profile
# Get thealiases and functions
if [ -f~/.bashrc ]; then
. ~/.bashrc
fi
# User specificenvironment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
报错:
[oracle@ocmdb2bin]$ sqlplus / as sysdba
-bash: sqlplus:command not found
解决办法:
在参数文件中添加
exportPATH=$PATH:$ORACLE_HOME/bin
原因是sqlplus应用程序的脚本位于这个文件夹下
内容总结
以上是互联网集市为您收集整理的bash:sqlplus:commandnotfound解决方法全部内容,希望文章能够帮你解决bash:sqlplus:commandnotfound解决方法所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。