当前位置:  数据库>oracle

Oracle 11gR2 RAC 使用scan IP无法连接数据库(ORA-12545)问题解决

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

    本文导语: 环境:[grid@rac1 ~]$ cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1       localhost.localdomain localhost::1        localhost6.localdomain6 localhost6# Public192.168.2.101     rac1192.168.2.102    ...

环境:
[grid@rac1 ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
::1        localhost6.localdomain6 localhost6
# Public
192.168.2.101     rac1
192.168.2.102     rac2
# Private
192.168.0.101     rac1-priv
192.168.0.102     rac2-priv
# Virtual
192.168.2.111     rac1-vip
192.168.2.112     rac2-vip
# SCAN
192.168.2.200     rac-scan















现象:

在windows客户端sqlplus工具使用scan的IP无法连接,报错如下:

C:UsersWJW>sqlplus system/qweasd@192.168.2.200:1521/orcl

SQL*Plus: Release 11.2.0.1.0 Production on Thu May 17 12:35:28 2012

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

ERROR:
ORA-12545: Connect failed because target host or object does not exist


检查各组件状态,正常:
[grid@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host      
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1      
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1      
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1      
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1      
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1      
ora.gsd        ora.gsd.type   ONLINE    ONLINE    rac1      
ora....network ora....rk.type ONLINE    ONLINE    rac1      
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    rac2      
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1      
ora.orcl.db    ora....se.type ONLINE    ONLINE    rac1      
ora....SM1.asm application    ONLINE    ONLINE    rac1      
ora....C1.lsnr application    ONLINE    ONLINE    rac1      
ora.rac1.gsd   application    ONLINE    ONLINE    rac1      
ora.rac1.ons   application    ONLINE    ONLINE    rac1      
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1      
ora....SM2.asm application    ONLINE    ONLINE    rac2      
ora....C2.lsnr application    ONLINE    ONLINE    rac2      
ora.rac2.gsd   application    ONLINE    ONLINE    rac2      
ora.rac2.ons   application    ONLINE    ONLINE    rac2      
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2      
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1

























检查监听器状态,正常:
[grid@rac1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-MAY-2012 13:27:40

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2012 12:19:51
Uptime                    0 days 1 hr. 7 min. 50 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.101)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.111)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully























[grid@rac2 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-MAY-2012 13:28:23

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2012 12:19:51
Uptime                    0 days 1 hr. 8 min. 32 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.112)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.102)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully























[grid@rac1 ~]$ lsnrctl status listener_scan1

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-MAY-2012 13:29:09

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2012 12:21:31
Uptime                    0 days 1 hr. 7 min. 37 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/log/diag/tnslsnr/rac1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.200)(PORT=1521)))
Services Summary...
Service "orcl" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully





















原因:
metalink说明:Client is able to resolve all Fully Qualified Domain Name (FQDN) SCAN and VIP name but not short ones(without domain name) as its in different domain;

even though FQDN names were specified during Grid Infrastructure setup, due to bug 9150053 by default DBCA set database parameter local_listener to short node VIP name

while database is created.
因此只要把数据库实例参数local_listener���的host改为vip的IP地址即可

解决办法:
rac1:
SQL> show parameter local_listener

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
local_listener                 string     (DESCRIPTION=(ADDRESS_LIST=(AD
                         DRESS=(PROTOCOL=TCP)(HOST=rac1
                         -vip)(PORT=1521))))
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.111)(PORT=1521))))' scope=both sid='orcl1';
SQL> alter system register;





rac2:
SQL> show parameter local_listener

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
local_listener                 string     (DESCRIPTION=(ADDRESS_LIST=(AD
                         DRESS=(PROTOCOL=TCP)(HOST=rac2
                         -vip)(PORT=1521))))
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.112)(PORT=1521))))' scope=both sid='orcl2';
SQL> alter system register;





随后使用windows客户端连接成功:
C:UsersWJW>sqlplus system/qweasd@192.168.2.200:1521/orcl

SQL*Plus: Release 11.2.0.1.0 Production on Thu May 17 13:14:39 2012

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


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




    
 
 

您可能感兴趣的文章:

  • 修改oracle用户的.bash_profile之后无法正常登陆
  • 安装oracle9时,安装界面的字体无法正确显示,怎么解决啊???
  • 64位win7下pl/sql无法连接oracle解决方法
  • 安装oracle9的时候字符无法显示??
  • Linux下Oracle数据库,dbstart持续不动,数据库无法启动解决
  • linux新建oracle用户无法登陆系统 大家帮帮忙
  • 解决Linux下Oracle无法关闭数据库的问题
  • Linux下Oracle RAC一个节点宕机导致共享存储无法挂载的故障排除
  • AS3安装Oracle 9.2.0前,打补丁出错,导致系统无法引导.大侠们帮忙
  • oracle9i安装时.installer启动后,界面无法显示中文.
  • Oracle数据库无法加载_OraMTS_的解决方法
  • Oracle 11G 无法连接到数据库实例故障排除
  • 我想配一个编程平台windowsXP+VisualStudio.net或者+Jbuilder,或Linux+oracle,用来做开发,我的电脑已经远远无法满足其要求,,不值
  • oracle修改SGA后无法启动问题分析及解决方法
  • Oracle用户密码含有特殊字符导致无法登陆解决方法
  • 关于Oracle启动无法启动netmgr问题的解决
  • Oracle 10g的DBA无法登录解决方案
  • 修改计算机名或IP后Oracle10g服务无法启动的解决方法
  • oracle 9i Linux 下安装时出现 无法建立inventory目录,你可能没有相应权限,请高手帮忙,100分,在线等!
  • PDO取Oracle lob大字段,当数据量太大无法取出的问题的解决办法
  • 网间Oracle的连接,远程连接Oracle服务器??
  • oracle远程连接服务器出现 ORA-12170 TNS:连接超时 解决办法
  • 不想装oracle却还要在redhat8.0下用jdbc连接oracle如何实现?
  • 我用JBuilder 7连接局域网内一ORACLE 9( 在本机可以连接)的问题?
  • 关于JDBC连接Oracle数据库,是否必须有Oracle客户端
  • oracle 数据库连接分析
  • Linux系统下利用java连接Oracle 10G
  • Jbuilder 7.0 连接 Oracle 数据库
  • 怎么直接通过JDBC连接oracle?
  • 请教: Javaswing 和 Oracle JDBC thin 连接的问题
  • opendbx 为什么连接不上oracle?
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • Oracle 数据库开发工具 Oracle SQL Developer
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • win2000+jbuilder6+oracle817编出的程序,在win2000下执行很好,在win98下却访问不了oracle数据库
  • ORACLE数据库常用字段数据类型介绍
  • oracle数据库导出和oracle导入数据的二种方法(oracle导入导出数据)
  • Oracle发布Oracle SQL Developer 1.2数据库开发工具 帮助用户简化开发工作
  • Oracle收购TimesTen 提高数据库软件性能
  • 卸载oracle数据库
  • Oracle数据库恢复后心得
  • linux上安装oracle 数据库后,是否能写shell程序实现数据库的自动启动。
  • Linux下如何用C语言操作Oracle数据库相关的图书推荐
  • Oracle数据库运行Oracle form时避免出现提示信息
  • Oracle欲收购开源数据库MySQL未果
  • Oracle数据库访问参数文件的顺序
  • 循序渐进学习Oracle数据库
  • 安装Oracle加载数据库错误areasQueries的解决
  • 用JDBC连接Oracle数据库时,如何向数据库中写日期型数据(格式)?谢了!
  • 让两个ORACLE数据库和平共处
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle 10g和Oracle 11g网格技术介绍
  • Oracle EBS R12 支持 Oracle Database 11g
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!


  • 站内导航:


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

    ©2012-2021,