看看这个:
> 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
看起来像工作
~ # 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
但无法连接
:~ # su oracle
> sqlplus / as sysdba
bash: sqlplus: no se encontró la orden
我不是甲骨文的人......我很感激任何帮助......(对不起我的英语)
sqlplus 不在您的路径中。
使用
su - oracle
代替su oracle
,因为这将读取用户 ~/.bash* 文件并相应地设置环境。在命令提示符处尝试“export LD_LIBRARY_PATH=$ORACLE_BASE/product/10.2.0/db_1/lib”,然后再次尝试 sqlplus。如果这样可行,您需要确保每次登录时都为环境设置了变量。