当前位置:  数据库>oracle

error: ORA-01034:oracle not available ORA-27101:shared memory realm does not exist

    来源: 互联网  发布时间:2017-06-05

    本文导语: 数据库:Oracle11g for Linux 1。查看日志可看到 Thu Mar 07 09:14:31 2013WARNING: Subscription for node down event still pending07-MAR-2013 09:14:31 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=localhost.localdomain)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)...

数据库:Oracle11g for Linux
 
1。查看日志可看到
 
Thu Mar 07 09:14:31 2013
WARNING: Subscription for node down event still pending
07-MAR-2013 09:14:31 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=localhost.localdomain)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE
=LISTENER)(VERSION=186646784)) * status * 0
 
 根据以往前辈的意见,在listener.ora中增加以下内容,然后重启监听。
 
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
 
 
 
2。关于2个ORA错误
 
  重启监听之后,在数据库主机上采用主机验证方式可以登录,说明登录数据库没问题,问题还是在监听上。再次查看local_listener, 其值为空。
 
  处理过程:
 
[oracle@localhost dbhome_1]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1
[oracle@localhost dbhome_1]$ cd network/admin
[oracle@localhost admin]$ ls -la
total 40
drwxr-xr-x. 3 oracle oinstall 4096 Mar 8 08:58 .
drwxr-xr-x. 11 oracle oinstall 4096 Dec 30 12:31 ..
-rw-r--r--. 1 oracle oinstall 739 Mar 8 08:58 listener.ora
-rw-r--r--. 1 oracle oinstall 12288 Mar 8 08:54 .listener.ora.swp
drwxr-xr-x. 2 oracle oinstall 4096 Dec 30 12:24 samples
-rw-r--r--. 1 oracle oinstall 187 May 7 2007 shrept.lst
-rw-r--r--. 1 oracle oinstall 222 Dec 31 18:08 sqlnet.ora
-rw-r-----. 1 oracle oinstall 331 Mar 3 16:00 tnsnames.ora
[oracle@localhost admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
 
ORCL =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.188)(PORT = 1521))
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = orcl)
 )
 )
 
[oracle@localhost admin]$ tnsping orcl
 
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 08-MAR-2013 09:25:28
 
Copyright (c) 1997, 2009, Oracle. All rights reserved.
 
Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
 

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.188)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)
[oracle@localhost admin]$ lsnrctl
 
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 08-MAR-2013 09:25:32
 
Copyright (c) 1991, 2009, Oracle. All rights reserved.
 
Welcome to LSNRCTL, type "help" for information.
 
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.188)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 08-MAR-2013 09:05:43
Uptime 0 days 0 hr. 19 min. 51 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.188)(PORT=1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "ORCL" has 1 instance(s).
 Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
 Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit
[oracle@localhost admin]$ sqlplus /nolog
 
SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 8 09:25:49 2013
 
Copyright (c) 1982, 2009, Oracle. All rights reserved.
 
SQL> connect sys@orcl as sysdba
Enter password:
ERROR:
ORA-01031: insufficient privileges
 

SQL> connect / as sysdba
Connected.
SQL> select status from v$instance;
 
STATUS
------------
OPEN
 
SQL> connect hwdosconplid/pokiujuwdxawsz@orcl
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
 

SQL> exit
[oracle@localhost admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
 (SID_LIST =
 (SID_DESC =
 (SID_NAME = PLSExtProc)
 (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
 (PROGRAM = extproc)
 )
 (SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ORCL)
)
)
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.188)(PORT = 1521))
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
 )
 )
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
 
 
 
同时看到监听日志中有如下记录:
 
***********************************************************************
Fatal NI connect error 12541, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=orcl)(CID=(PROGRAM=emagent)(HOST=localhost.localdomain)(USER=oracle))))
 
VERSION INFORMATION:
 TNS for Linux: Version 11.2.0.1.0 - Production
 TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
 Time: 07-MAR-2013 18:01:20
 Tracing not turned on.
 Tns error struct:
 ns main err code: 12541
 TNS-12541: TNS:no listener
 ns secondary err code: 12560
 nt main err code: 511
 TNS-00511: No listener
 nt secondary err code: 111
 
 
 
 
 
[oracle@localhost admin]$ cat sqlnet.ora
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
 
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
 
ADR_BASE = /u01/app/oracle
 
[oracle@localhost admin]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
[oracle@localhost admin]$ cd  $ORACLE_HOME/dbs
[oracle@localhost dbs]$ ls -l
total 28
-rw-rw----. 1 oracle oinstall 1544 Mar 8 09:05 hc_orcl.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r--. 1 oracle oinstall 1202 Mar 7 15:35 initorcl.ora
-rw-r-----. 1 oracle oinstall 24 Dec 30 12:51 lkORCL
-rw-r-----. 1 oracle oinstall 1536 Dec 30 13:58 orapworcl
-rw-r-----. 1 oracle oinstall 3584 Mar 7 18:03 spfileorcl_back.ora
-rw-r--r--. 1 root root 2560 Mar 7 18:06 spfileorcl.ora
[oracle@localhost dbs]$ export ORACLE_SID=orcl
[oracle@localhost dbs]$ sqlplus /nolog
 
SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 8 09:41:42 2013
 
Copyright (c) 1982, 2009, Oracle. All rights reserved.
 
SQL> connect / as sysdba
Connected.
 
SQL> show parameter local;
 
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string
log_archive_local_first boolean TRUE
parallel_force_local boolean FALSE
 

[oracle@localhost dbs]$ ls -l
total 28
-rw-rw----. 1 oracle oinstall 1544 Mar 8 09:05 hc_orcl.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r--. 1 oracle oinstall 1202 Mar 7 15:35 initorcl.ora
-rw-r-----. 1 oracle oinstall 24 Dec 30 12:51 lkORCL
-rw-r-----. 1 oracle oinstall 1536 Dec 30 13:58 orapworcl
-rw-r-----. 1 oracle oinstall 3584 Mar 7 18:03 spfileorcl_back.ora
-rw-r--r--. 1 root root 2560 Mar 7 18:06 spfileorcl.ora
[oracle@localhost dbs]$ su
Password:
[root@localhost dbs]# chmod 777 spfileorcl.ora
[root@localhost dbs]# ls -l
total 28
-rw-rw----. 1 oracle oinstall 1544 Mar 8 09:05 hc_orcl.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r--. 1 oracle oinstall 1202 Mar 7 15:35 initorcl.ora
-rw-r-----. 1 oracle oinstall 24 Dec 30 12:51 lkORCL
-rw-r-----. 1 oracle oinstall 1536 Dec 30 13:58 orapworcl
-rw-r-----. 1 oracle oinstall 3584 Mar 7 18:03 spfileorcl_back.ora
-rwxrwxrwx. 1 root root 2560 Mar 7 18:06 spfileorcl.ora
[root@localhost dbs]# exit
exit
[oracle@localhost dbs]$ sqlplus /nolog
 
SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 8 09:49:38 2013
 
Copyright (c) 1982, 2009, Oracle. All rights reserved.
 
SQL> connect / as sysdba
Connected.
SQL> alter system set local_listener = '(ADDRESS = (PROTOCOL=TCP)(HOST=192.168.0.188)(PORT=1521)(SID=orcl))' scope=spfile;
 
System altered.
 

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
 
Total System Global Area 6680915968 bytes
Fixed Size 2213936 bytes
Variable Size 3892316112 bytes
Database Buffers 2751463424 bytes
Redo Buffers 34922496 bytes
Database mounted.
Database opened.
SQL> connect hwdosconplid/pokiujuwdxawsz@orcl
Connected.
SQL> OK
SP2-0042: unknown command "OK" - rest of line ignored.
SQL>
 
 
 
如果local_listener缺失,将导致自动实例注册失败,数据库实例不会识别Listener;当Listener连接数据库实例的时候,由于Listener没有注册,导致了这两个错误


    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • java命名空间javax.management.monitor类monitor的类成员方法: observed_attribute_type_error_notified定义及介绍
  • error: ‘CLOCK_VIRTUAL’ was not declared in this scope
  • configure: error: Standard C math library -lm not found
  • ERROR: Module ipt_nmsensor does not exist in /proc/modules
  • configure:error:Valid xpm library not found
  • 硬盘安装FEDORA13,报Error 15:File not found
  • 运行 deploytool 时出现: error: can't not connect to server localhost
  • error: initializer element is not constant 错误
  • error: OpenSSL headers not found
  • 我用JBuilder5 出了个问题:Error#466:method does not return a vlue at line ……
  • fedora 15 找不到 qt 提示error: Qt (>= Qt 3.0) (headers and libraries) not found急
  • 第一次用epoll就傻眼,程序报create_epoll error Function not implemented
  • error for wireless:Could not load firmware file zd1211/zd1211b_ub
  • Apache启动错误Permission denied: httpd: could not open error log file解决方法
  • configure: error: can not guess host type; you must specify one
  • PHP扩展报错[error: ‘PHP_FE_END’ undeclared here (not in a function)]
  • vmware问题:启动vmware下redhat8.0时出错VMware Workstation unrecoverable error: (vmx)AIO: NOT_IMPLEMENTED F(4318):1679
  • Windows平台的 PHP 报错 Fatal error: Class COM not found in 的解决方法
  • linux安装svn时出现configure: error: could not find library containing RSA_new
  • 求救:relocation error:symbol_ pure_virtual_: referenced symbol not found?急!急!
  • 安装mysql 出现“The error means mysqld does not have the access rights to”
  • java命名空间java.lang类error的类成员方法: error定义及介绍
  • php异常:Parse error: syntax error, unexpected eval()'d code error
  • java命名空间java.awt枚举trayicon.messagetype的类成员方法: error定义及介绍
  • runtime error与compile time error的区别?
  • java命名空间javax.tools枚举diagnostic.kind的类成员方法: error定义及介绍
  • Error Mounting /dev/acd0 on /dist: Input/output error(5)
  • java命名空间java.awt类mediatracker的类成员方法: errored定义及介绍
  • tar:error exit delayed from previous errors
  • java命名空间javax.lang.model.type枚举typekind的类成员方法: error定义及介绍
  • PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,