bash: sqlplus: command not found 解决方法

来源:互联网 发布:网络成瘾的影响 编辑:程序博客网 时间:2024/05/20 05:28

bash: sqlplus: command not found 解决方法
环境变量已经配好,但是仍报错:

[Oracle@dg1 ~]$ vi .bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHunset USERNAMEexport EDITOR=viexport ORACLE_SID=dg1export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libexport PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/binexport PATH=$ORACLE_HOME/bin:$PATHumask 022

解决方法:

[oracle@dg1 ~]$ sqlplus /nologbash: sqlplus: command not found[oracle@dg1 ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/binln: creating symbolic link `/usr/bin/sqlplus' to `/bin/sqlplus': Permission deni ed[oracle@dg1 ~]$ su - rootPassword:[root@dg1 ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin[root@dg1 ~]# su - oracle[oracle@dg1 ~]$ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Mon May 11 12:51:24 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn / as sysdbaConnected to an idle instance.SQL> startupORACLE instance started.Total System Global Area  167772160 bytesFixed Size                  1218316 bytesVariable Size              79694068 bytesDatabase Buffers           83886080 bytesRedo Buffers                2973696 bytesDatabase mounted.Database opened.SQL>
0 0