Oracle service name与instance name 不一致ORA-27101: shared memory realm does not exist

简介: 1. 今天在客户端连接服务端时报如下错误[oracle@asm admin]$ sqlplus sys/xxxx@orcl as sysdbaSQL*Plus: Release 11.

1. 今天在客户端连接服务端时报如下错误

[oracle@asm admin]$ sqlplus sys/xxxx@orcl as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 26 19:49:03 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

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

2. 但在服务 端数据库正常启动,也能以sys登陆

[oracle@asm ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 26 19:51:56 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> 

3. 查看客户端tnsname.ora配置文件如下

orcl =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.111)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME= orcl)
    )
  )

4. 再三纠结,之后查看数据库servcie name

SQL> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      orcl
db_unique_name                       string      primary
global_names                         boolean     FALSE
instance_name                        string      orcl
lock_name_space                      string
log_file_name_convert                string
service_names                        string      primary

发现数据库的service_name=primary

原来是这个错误:service name与instance name

5. 把客户端配置文件tnsname.ora改成如下:

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.111)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = primary)
    )
  )

连接成功


目录
相关文章
|
Oracle 关系型数据库 数据库
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist的原因分析
        今天突然接到同事电话,说oracle数据库连接不上了,我远程过去用pl/sql developer登录,提示ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist.意思是oracle无法使用,共享内存领域不存在。
2267 0
|
Oracle 关系型数据库
|
SQL Oracle 关系型数据库
在Oracle/SQL Service中通过Function返回Table
本函数用途:返回一个Table 在Oracle中实现,范例: 1 --在Types中: 2 create or replace type objTable as object 3 ( 4 s_usercode varchar2(32767), 5 s_usernam...
827 0
|
SQL Oracle 关系型数据库
在SQL service或Oracle中将数字转换成有千位符号
1、在SQL service中的写法: 1 --Function主体 2 CREATE FUNCTION [dbo].[FnMoneyStyle](@Number float,@strType char(1)) 3 RETURNS VARCHAR(100) 4 AS 5 BE...
1171 0
|
SQL Oracle 关系型数据库
Oracle Database Vault - Realm
http://blog.csdn.net/teapot82/article/details/6618894 1.  REALM的作用 Oracle Database Vault通过建立REALM可以防止未授权的DBA用户访问REALM内的业务数据。
948 0
|
4天前
|
Oracle 关系型数据库 数据处理
|
4天前
|
SQL 监控 Oracle
|
3天前
|
SQL Oracle 关系型数据库

推荐镜像

更多