RAC监听,实例名与服务名不一致一例 [(原创)](ORA-27101,ORA-01034)

11.2.0.3for RHEL5.6

[oracle@lxasm ~]$ sqlplus system/qazwsx@lxasmorc1


SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 19 01:21:47 2013


Copyright (c) 1982, 2011, 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


明明信息已经注册到监听上去了,以及数据库也是启动了的

--用本地认证登录进行验证是否启动数据库
 [oracle@lxasm ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 19 01:22:33 2013

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


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


SQL> 



查看参数:
SQL>  show parameter name
 NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY            boolean     FALSE
awr_snapshot_time_offset               integer     0
control_management_pack_access         string      DIAGNOSTIC+TUNING
cursor_bind_capture_destination        string      memory+disk
db_file_name_convert                   string
db_name                                string      lxasmorc
db_unique_name                         string      lxasmorcl
enable_ddl_logging                     boolean     FALSE
global_names                           boolean     FALSE
instance_name                          string      lxasmorc1
java_jit_enabled                       boolean     TRUE
service_names                          string  lxasmorcl 

通过检查发现,instance_name和service_names不一样 一个是L(小写)一个是1

现在是instancelxasmorc 1
所以注册上去后,通过@lxasmorc1这种方式连接 会去查找lxasmorc 1 Service name,然而这里服务名是lxasmorc l(L)
所以判断认为实例没有启动

解决方案:
创建pfile并关闭数据库
[oracle@lxasm dbs]$ export ORACLE_SID=lxasmorc1  (这里只是说明一下,依然是1SID,如果你没更改,可不export)

[oracle@lxasm ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 19 01:22:33 2013

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

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

SQL>create pfile from spfile;
 
SQL>shutdown immediate;

将pfile改名后尝试启动
[oracle@lxasm dbs]$  cp initlxasmorc1.ora initlxasmorcl.ora 

 [oracle@lxasm dbs]$ export ORACLE_SID=lxasmorcl
[oracle@lxasm dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 19 01:26:05 2013

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

Connected to an idle instance.

SQL> startup

ORA-29760: instance_number parameter not specified 


这时候报这个错。继续修复修改pfile中的instance_number参数
 
[oracle@lxasm dbs]$  vi initlxasmorcl.ora 
修改pfile中的
 lxasmorc1.instance_number=1 
 变为
 lxasmorcl.instance_number=1  




保存 退出

[oracle@lxasm dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 19 01:26:05 2013

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

Connected to an idle instance. 
SQL>startup pfile='?/dbs/initlxasmorcl.ora'

启动成功!

这里注意,再成功后,要把dbs目录下的密码文件也改名正确(orc1 变为 orcl)
再登陆进去 赋予sys ,system sysdba权限。否则sqlplus system/password@lxasmorcl as sysdba无法登陆的(报没有权限错误)
还有一个收获,就是你安装完grid,安装完程序,最好顺便也把库建了,而不是甩给别的同事,因为很有可能就会出现 l 1不分的情况。。
当然,是在你没有交代清楚,同事也没问的情况下
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值