RAC客戶端訪問DB只能用VIP不能用VIP對應的hostname

tolywang發表於2010-01-13
Oracle 10.2.0.4  RAC    3節點
Red Hat Linux AS 5.3   


客戶端設定VIP的IP地址可以正常訪問 。

TEST_RAC =
  (DESCRIPTION =
    (FAILOVER=ON)
    (LOAD_BALANCE = ON)
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.8.101)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.8.102)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.8.103)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = TEST)
      (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))
    )
  )




但是客戶端設定VIP對應的hostname 就不能正常訪問,不過在db server本機上tnsnames.ora中這樣設定可以訪問 。  

TEST_RAC =
  (DESCRIPTION =
    (FAILOVER=ON)
    (LOAD_BALANCE = ON)
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip01)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip02)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip03)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = TEST)
      (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))
    )
  )



/etc/hosts  設定也沒有問題。




[root@rac01 ~]# 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

10.10.8.91        rac01
192.168.1.11    pri01
10.10.8.101      vip01


10.10.8.92        rac02
192.168.1.13    pri02
10.10.8.102      vip02

10.10.8.93        rac03
192.168.1.13    pri03
10.10.8.103      vip03

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-625072/,如需轉載,請註明出處,否則將追究法律責任。

相關文章