RAC ORA_12545错误

RAC ORA_12545错误

VMwareLinux下搭建好RAC,客户端连接到数据库报ORA_12545错误:一次成功,一次失败

原因:

This error happens when you enable server side load balancing but the client does not have domain address / DNS search function setup (or valid /etc/hosts file) so it cannot translate a hostname to a proper IP address.

     使用默认端口1521会产生这个错误(没有测试过)

通过修改客户端的tnsnames.oraC:\WINDOWS\system32\drivers\etc\hosts文件解决

tnsnames.ora中添加下面的内容

RAC =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.15.101)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.15.102)(PORT = 1521))

    (LOAD_BALANCE = yes)

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = RAC.WORLD)

    )

  )

:HOSTVIP

hosts中添加下面的内容

10.182.15.101   rac1-vip.localdomain    rac1.localdomain

10.182.15.102   rac2-vip.localdomain    rac2.localdomain

    : rac1-vip.localdomainVIP对应的hostname; rac1.localdomainhostname命令的执行结果

通过修改初始化参数local_listener解决

[oracle@rac1 ~]$ sqlplus sys@rac1  as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 14 10:13:26 2009

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

Enter password:

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL>  select instance_name from v$instance;

INSTANCE_NAME

----------------

RAC1

SQL>  alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.15.101)(PORT = 1521))' SID='RAC1';

System altered.

 

 

[oracle@rac2 ~]$ sqlplus sys@rac2 as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 14 10:26:45 2009

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

Enter password:

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select instance_name from v$instance;

INSTANCE_NAME

----------------

RAC2

SQL> alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.15.102)(PORT = 1521))' SID='RAC2';

System altered.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7419833/viewspace-588949/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7419833/viewspace-588949/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值