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 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM