操作系统是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 programsexport 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 statusLSNRCTL for Linux: Version 10.2.0.4.0 - Production on 31-OCT-2011 11:57:36Copyright (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 /nologSQL*Plus: Release 10.2.0.4.0 - Production on Mon Oct 31 11:57:39 2011Copyright (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 TRUESQL> 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@orclSQL*Plus: Release 10.2.0.4.0 - Production on Mon Oct 31 12:13:17 2011Copyright (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 optionsSQL>
-The End-虚拟机RAC的ASM磁盘组坏块导致重建DB解决ORA-00600: internal error code, arguments: [kcblasm_1], [103]相关资讯 Oracle数据库 Oracle入门教程 oracle数据库教程
- Oracle数据库全球化 (03月01日)
- Oracle数据库日期过滤方法性能比较 (02/02/2015 13:20:26)
- Oracle数据库安装中端口被占用问题 (10/29/2014 07:42:24)
| - 在CentOS 6.6上搭建C++运行环境并 (10/10/2015 19:44:40)
- Oracle数据库无法使用localhost和 (11/14/2014 16:39:10)
- 使用SQLT来构建Oracle测试用例 (08/28/2014 06:17:41)
|
本文评论 查看全部评论 (0)