- 最后登录
- 2014-10-30
- 在线时间
- 5 小时
- 威望
- 0
- 金钱
- 39
- 注册时间
- 2013-5-9
- 阅读权限
- 10
- 帖子
- 5
- 精华
- 0
- 积分
- 0
- UID
- 1084
|
1#
发表于 2013-5-28 13:25:16
|
查看: 3470 |
回复: 2
环境:redhatlinux 5.4 oracle 11.2.0.3.0 RAC
现象:
[oracle@rac1-11g ~]$ vi .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 DISPLAY=192.168.33.3:0.0
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=rac11g1
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/product/11.2.0/db_1
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export SWINGHOME=/home/oracle/swingbench
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
~
~
~
~
~
~
~
[oracle@rac1-11g ~]$ export ORACLE_HOME=/oracle/product/11.2.0/db_1/
[oracle@rac1-11g ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue May 28 01:52:17 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> exit
Disconnected
即当在 环境变量ORACLE_HOME的路径的末尾加"/"之后使用sqlplus / as sysdba方式连接数据库看到的状态是idle,而其实数据库已经启动了,通过监听方式连接是open的。
那么请问这是为什么呢?
查看命令的相关依赖发现不太一样。
[oracle@rac1-11g ~]$ export ORACLE_HOME=/oracle/product/11.2.0/db_1/
[oracle@rac1-11g ~]$ ldd /oracle/product/11.2.0/db_1/bin/sqlplus
libsqlplus.so => /oracle/product/11.2.0/db_1/lib/libsqlplus.so (0x00002b7fe7366000)
libclntsh.so.11.1 => /oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1 (0x00002b7fe754e000)
libnnz11.so => /oracle/product/11.2.0/db_1/lib/libnnz11.so (0x00002b7fe9edb000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003d93600000)
libm.so.6 => /lib64/libm.so.6 (0x0000003d93200000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d93a00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003d96e00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003d92e00000)
libaio.so.1 => /usr/lib64/libaio.so.1 (0x00002b7fea2c9000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d92a00000)
[oracle@rac1-11g ~]$
[oracle@rac1-11g ~]$
[oracle@rac1-11g ~]$
[oracle@rac1-11g ~]$ export ORACLE_HOME=/oracle/product/11.2.0/db_1
[oracle@rac1-11g ~]$ ldd /oracle/product/11.2.0/db_1/bin/sqlplus
libsqlplus.so => /oracle/product/11.2.0/db_1/lib/libsqlplus.so (0x00002b9b5d2cb000)
libclntsh.so.11.1 => /oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1 (0x00002b9b5d4b3000)
libnnz11.so => /oracle/product/11.2.0/db_1/lib/libnnz11.so (0x00002b9b5fe40000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003d93600000)
libm.so.6 => /lib64/libm.so.6 (0x0000003d93200000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d93a00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003d96e00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003d92e00000)
libaio.so.1 => /usr/lib64/libaio.so.1 (0x00002b9b6022e000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d92a00000)
[oracle@rac1-11g ~]$ |
|