zoukankan      html  css  js  c++  java
  • 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 
  • 相关阅读:
    找回感觉的练习
    Java住房公积金管理系统---长春工业大学期末实训
    11.6_Filter
    11.5_Listener
    11.4_Ajax & Jquery
    11.3_MVC设计模式
    11.2_数据库连接池&DBUtils
    11.1_事物
    10.7_JSP & EL & JSTL
    10.6_Cookie&Session
  • 原文地址:https://www.cnblogs.com/ios9/p/8858768.html
Copyright © 2011-2022 走看看