Linux Oracle bash: “sqlplus / as sysdba”: command not found 解决方法


bash: sqlplus: command not found 解决方法

注:本文来源于 《   bash: sqlplus: command not found 解决方法   》

1:问题情况:

322812841267102449


2:问题处理



         1: 环境变量已经配好,但是仍报错:

  1 [oracle@dg1 ~]$ vi .bash_profile
  2 
  3 # .bash_profile
  4 
  5 # Get the aliases and functions
  6 if [ -f ~/.bashrc ]; then
  7         . ~/.bashrc
  8 fi
  9 
 10 # User specific environment and startup programs
 11 
 12 PATH=$PATH:$HOME/bin
 13 
 14 export PATH
 15 unset USERNAME
 16 
 17 export EDITOR=vi
 18 export ORACLE_SID=dg1
 19 export ORACLE_BASE=/u01/app/oracle
 20 export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
 21 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
 22 export PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
 23 export PATH=$ORACLE_HOME/bin:$PATH
 24 

 

         2:解决方法:

  1 [oracle@dg1 ~]$ sqlplus /nolog
  2 bash: sqlplus: command not found
  3 [oracle@dg1 ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
  4 ln: creating symbolic link `/usr/bin/sqlplus' to `/bin/sqlplus': Permission deni ed
  5 [oracle@dg1 ~]$ su - root
  6 Password:
  7 [root@dg1 ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
  8 [root@dg1 ~]# su - oracle
  9 [oracle@dg1 ~]$ sqlplus /nolog
 10 
 11 SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 11 12:51:24 2009
 12 
 13 Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 14 
 15 SQL> conn / as sysdba
 16 Connected to an idle instance.
 17 SQL> startup
 18 ORACLE instance started.
 19 
 20 Total System Global Area  167772160 bytes
 21 Fixed Size                  1218316 bytes
 22 Variable Size              79694068 bytes
 23 Database Buffers           83886080 bytes
 24 Redo Buffers                2973696 bytes
 25 Database mounted.
 26 Database opened.
 27 SQL>
 28 
 29 

转载于:https://www.cnblogs.com/ios9/p/8858768.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值