ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RAC ORA_12545错误

RAC ORA_12545错误

原创 Linux操作系统 作者:jifei0611 时间:2009-04-14 10:48:17 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-12

  • 博文量
    143
  • 访问量
    271909