Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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)

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
ups... that was a noob error... thanks =D –  maniat1k Apr 24 '12 at 14:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.