Oracle RAC 客戶端負載均衡配置

wuyuanyong發表於2010-07-03

Oracle RAC 客戶端負載均衡配置
RAC客戶端配置常見的報錯:
ORA-12545: 因目標主機或物件不存在,連線失敗。

1 RAC 客戶端配置方法
1.1 配置hosts
修改C:WindowsSystem32driversetchosts(Windows)
或/etc/hosts(Linux|AIX)
100.51.41.131 bwgl_db1
100.51.41.132 bwgl_db2
100.51.41.133 bwgl_db1-vip
100.51.41.134 bwgl_db2-vip

bwgl_db1,bwgl_db2一定要和節點伺服器的機器名相同,bwgl_db1-vip,bwgl_db2-vip和伺服器端配置的VIP名稱相同。
1.2 配置TNSNAMES.ORA
修改$ORACLE_HOME/network/admin/tnsnames.ora(在手動修改tnsnames.ora請注意不要用TAB鍵,都是空格)
FZFWDB =
(DESCRIPTION =
(FAILOVER = on)
(ADDRESS_LIST =
(LOAD_BALANCE = yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = bwgl_db1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = bwgl_db2-vip)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = fzfwdb)
(TYPE = select)
(METHOD = basic)
(RETRIES = 180)
(DELAY = 5)
)
)
2 JDBC叢集負載均衡的配置方法
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = bwgl_db1-vip)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = bwgl_db2-vip)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = FZFWDB)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))
bwgl_db1-vip bwgl_db2-vip 可以用IP代替。
相關檢視:
http://space.itpub.net/471666/viewspace-224943
Oracle RAC Failover詳解:http://blog.csdn.net/tianlesoftware/archive/2010/03/03/5340788.aspx

相關閱讀:
? Oracle Blob 轉換為Clob (尛樣兒, 2010-6-10)
? oracle 基礎教程 精華 (syforacle, 2010-6-10)
? 經典SQL大全 (syforacle, 2010-6-11)
? Oracle 登入觸發器 (尛樣兒, 2010-6-12)
? Every Rman Command Generates Error ORA-01861 (文件 ID 791329.1) (thompsun, 2010-6-12)
? 如何加快exp/imp的速度 - direct=y (zecaro, 2010-6-13)
? 使用直接模式direct=y匯出資料比傳統方式快一倍 (zecaro, 2010-6-13)
? 啥是ETL、ELT (zecaro, 2010-6-13)
? [轉載]Oracle RAC Failover 詳解 (尛樣兒

本文出自:http://space.itpub.net/23135684/viewspace-630945

[@more@]

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

相關文章