Sqlplus not working on opensuse

oraclesqlplus

take a look at this:

> cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
umask 022
#DISPLAY=:0.0
#export DISPLAY
TMP=/tmp
TMPDIR=/tmp

ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/bin
export PATH

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

ORACLE_SID=SSAE
export ORACLE_SID

looks like working

~ # service dbora status

LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 24-APR-2012 10:01:40

Copyright (c) 1991, 2006, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date                09-APR-2012 13:19:59
Uptime                    14 days 20 hr. 41 min. 41 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=t2libora1)(PORT=1521)))
Services Summary...
Service "xxxx" has 1 instance(s).
  Instance "xxxx", status READY, has 1 handler(s) for this service...
Service "xxxxDB" has 1 instance(s).
  Instance "xxxx", status READY, has 1 handler(s) for this service...
Service "xxxx_XPT" has 1 instance(s).
  Instance "xxxx", status READY, has 1 handler(s) for this service...
The command completed successfully

but cant connect

:~ # su oracle
>  sqlplus / as sysdba
bash: sqlplus: no se encontrĂ³ la orden

I'm not a oracle guy … any help I appreciate.. (sorry my english)

Best Answer

sqlplus is not in your path.

Use su - oracle instead of su oracle, as that will read the users ~/.bash* files & set the environment accordingly.