oracle RAC的客户端HA配置

ORACLE 9i RAC 环境下,为了做到高可用性,需要对客户端的 tnsnames.ora 这个文件进行配置,在oracle中这样的配置叫做TAF,这个配置不能使用NETCA配置程序生成。其中 ORA RAC 数据库的数据库名,另外,各个不同的节点的实例名分别为 ORA1 ORA2 ,以下配置中的两个连接配置分别互为备份,切换时间为 5 秒。
以下所示为配置示例。
 
ORA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.13)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.14)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORA)
      (INSTANCE_NAME = ORA1)
      (INSTANCE_ROLE = PRIMARY)
      (FAILOVER_MODE =
        (BACKUP = ORA_BACKUP)
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 30)
        (DELAY = 5)
      )
    )
  )
 
ORA_BACKUP =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.14)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.13)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORA)
      (INSTANCE_NAME = ORA2)
      (INSTANCE_ROLE = PRIMARY)
      (FAILOVER_MODE =
        (BACKUP = ORA)
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 30)
        (DELAY = 5)
      )
    )
  )
在以上示例中所标红部分为 TNS 的别名及备份 TNS 别名,可按用户应用的需要自行修改。
    在以上示例中所标蓝部分,分别为 RAC 数据库的服务名和各节点的实例名,可按节点数量的不同及服务名的不同自行修改。
       此配置适用于 oracle 9i oracle 10g

你可能感兴趣的:(oracle,职场,休闲,RAC的客户端配置)