[Solved] Linux Oracle bash: “sqlplus / as sysdba”: command not found

 

bash: sqlplus: command not found solution

1: Problem situation:

 

2: How to Solve

 

 

1: polio variable is good, but still errors:

  1 [[email protected] ~]$ 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. Solution:

  1 [[email protected] ~]$ sqlplus /nolog
  2 bash: sqlplus: command not found
  3 [[email protected] ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
  4 ln: creating symbolic link `/usr/bin/sqlplus' to `/bin/sqlplus': Permission deni ed
  5 [[email protected] ~]$ su - root
  6 Password:
  7 [[email protected] ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
  8 [[email protected] ~]# su - oracle
  9 [[email protected] ~]$ 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

Similar Posts: