• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

bash:sqlplus:commandnotfound解决方法

mysql 搞代码 4年前 (2022-01-09) 47次浏览 已收录 0个评论

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 environme来1源gaodai#ma#com搞*代#码1网nt 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应用程序的脚本位于这个文件夹下


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:bash:sqlplus:commandnotfound解决方法

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址