11gR2 RAC使用SCAN故障切換問題的解決方案

spectre2發表於2013-06-09
11gR2 RAC安裝後,預設使用SCANlistener,但是客戶端直接使用scan的tns連線,連線正常,但是故障切換有問題,以下是解決方案:
兩種方式:
1:>遠端tnsnames.ora 增加故障切換內容(直接使用vip):
king1=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3-vip)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac4-vip)(PORT = 1521))
    )
    (LOAD_BALANCE=yes)
    (FAILOVER=yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dbeas)      
      (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)
      )
    )
  )

2:在tnsnames.ora裡面加入scan ip
dbeas=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = scan)(PORT = 1521))
        )
    (LOAD_BALANCE=yes)
    (FAILOVER=yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dbeas)      
      (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)
      )
    )
  )


相當於在scanip的基礎上做了個client taf
注:文中rac*-vip、scan請使用實際ip。
參考:http://www.itpub.net/thread-1305371-1-1.html

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

相關文章