最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

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

来源:动视网 责编:小采 时间:2020-11-09 11:49:38
文档

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

无法使用连接串连接数据库ORA-01034ORA-27101:操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的方式。 操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的
推荐度:
导读无法使用连接串连接数据库ORA-01034ORA-27101:操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的方式。 操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的


操作系统是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:操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的方式。 操作系统是linux as5,数据库是10g,在重启机器后,使用@connecct_string的方式无法连接上数据库,只能使用用户/密码的
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top