无法使用连接串连接数据库ORA-01034ORA-27101
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了无法使用连接串连接数据库ORA-01034ORA-27101,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3745字,纯文字阅读大概需要6分钟。
内容图文
![无法使用连接串连接数据库ORA-01034ORA-27101](/upload/InfoBanner/zyjiaocheng/551/d58701fc42aa48eb80197ae4519af49c.jpg)
操作系统是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-
内容总结
以上是互联网集市为您收集整理的无法使用连接串连接数据库ORA-01034ORA-27101全部内容,希望文章能够帮你解决无法使用连接串连接数据库ORA-01034ORA-27101所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。