您好,欢迎访问一九零五行业门户网

无法使用连接串连接数据库ORA-01034ORA-27101

操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的方式。
操作系统是linux as5,数据库是10g,,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的方式。
事后总结了下:这个问题是发生在删除已有数据之后,再重新创建了2个数据库的情况下,如果你也做过类似操作,基本上是同一个问题。
错误如下:
sql> conn system/test@orcl
error:
ora-01034: oracle not available
ora-27101: shared memory realm does not exist
linux error: 2: no such file or directory
检查了环境环境变量,查看了监听状态和实例状态都是正常的。
[oracle@localhost ~]$ cat .bash_profile
# .bash_profile
# get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi
# user specific environment and startup programs
export tmp=/tmp;
export tmpdir=$tmp;
export oracle_base=/usr/oracle;
export oracle_home=/usr/oracle/product/10.2.0/db_1;
export oracle_sid=orcl;
export oracle_term=xterm;
export ld_library_path=$oracle_home/lib:/lib:/usr/lib
export classpath=$oracle_home/jre:$oracle_home/jlib:$oracle_home/rdbms/jlib
export nls_lang=american_america.zhs16gbk
export path=$path:$oracle_home/bin:/sbin:/usr/bin:/usr/sbin;
umask 022
[oracle@localhost ~]$ lsnrctl status
lsnrctl for linux: version 10.2.0.4.0 - production on 31-oct-2011 11:57:36
copyright (c) 1991, 2007, oracle.  all rights reserved.
connecting to (description=(address=(protocol=ipc)(key=extproc1)))
status of the listener
------------------------
alias                     listener
version                   tnslsnr for linux: version 10.2.0.4.0 - production
start date                31-oct-2011 11:43:36
uptime                    0 days 0 hr. 14 min. 0 sec
trace level               off
security                  on: local os authentication
snmp                      off
listener parameter file   /usr/oracle/product/10.2.0/db_1/network/admin/listener.ora
listener log file         /usr/oracle/product/10.2.0/db_1/network/log/listener.log
listening endpoints summary...
  (description=(address=(protocol=ipc)(key=extproc1)))
  (description=(address=(protocol=tcp)(host=192.168.2.4)(port=1521)))
services summary...
service orcl has 1 instance(s).
  instance orcl, status unknown, has 1 handler(s) for this service...
the command completed successfully
[oracle@localhost ~]$ sqlplus /nolog
sql*plus: release 10.2.0.4.0 - production on mon oct 31 11:57:39 2011
copyright (c) 1982, 2007, oracle.  all rights reserved.
sql> conn system/test
connected.
sql> conn system/test@orcl
error:
ora-01034: oracle not available
ora-27101: shared memory realm does not exist
linux error: 2: no such file or directory
warning: you are no longer connected to oracle.
到网络上搜索了下,发现设置了下local_listener即可。
sql> conn /as sysdba
connected.
sql> show parameter local_listener;
sql> show parameter local;
name                     type     value
------------------------------------ ----------- ------------------------------
local_listener                 string
log_archive_local_first          boolean     true
sql> alter system set local_listener='(address =(protocol=tcp)(host=192.168.2.4)(port=1521)(sid=orcl))';
system altered.
sql> alter system register;
system altered.
sql> exit
disconnected from oracle database 10g enterprise edition release 10.2.0.4.0 - production
with the partitioning, olap, data mining and real application testing options
[oracle@localhost admin]$ sqlplus system/test@orcl
sql*plus: release 10.2.0.4.0 - production on mon oct 31 12:13:17 2011
copyright (c) 1982, 2007, oracle.  all rights reserved.
connected to:
oracle database 10g enterprise edition release 10.2.0.4.0 - production
with the partitioning, olap, data mining and real application testing options
sql>
-the end-
其它类似信息

推荐信息