Oracle9i, 10g, 11g 負載均衡(load balance)和Fail Over
關鍵詞: load balance (負載均衡) , fail over (透明切換)
以Oracle10g 為例子,Linux AS4.5
以下是listener.ora , tnsnames.ora , spfile 中的幾個配置 。
ecsrac01$cat listener.ora
# listener.ora.ecsrac01 Network Configuration File: /u01/product/oracle/network/admin/listener.ora.ecsrac01
# Generated by Oracle configuration tools.
LISTENER_ECSRAC01 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip01)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.134.130.177)(PORT = 1521)(IP = FIRST))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
ecsrac01$cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/product/oracle/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ECSDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip02)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ecsdb)
(INSTANCE_NAME = ecsdb2)
)
)
ECSDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ecsdb)
(INSTANCE_NAME = ecsdb1)
)
)
ECS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.134.130.170)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ecsdb)
)
)
ECSDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip01)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip02)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ecsdb)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
LISTENERS_ECSDB =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip01)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip02)(PORT = 1521))
)
LOCAL_ECSDB =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.134.130.177)(PORT = 1521))
)
SQL> show parameter list
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LOCAL_ECSDB
remote_listener string LISTENERS_ECSDB
------------------------------------------------------------------------------------------------------------------
客戶端Load Balance,Failover 設定 :
ECSDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip01)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip02)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ecsdb)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
--------------------------------------------------------------------------------------------------------------------
Server 端Load Balance,Failover 設定 :
Server 端的tnsnames.ora 中包含有
LISTENERS_ECSDB =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip01)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ecsvip02)(PORT = 1521))
)
然後remote_listener 設定為tnsnames.ora 中的這個監聽設定即可 。
SQL> show parameter list
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LOCAL_ECSDB
remote_listener string LISTENERS_ECSDB
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-592602/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC Load Balance , Fail Over測試OracleAI
- 彈性負載均衡(Elastic Load Balance,ELB)負載AST
- 伺服器負載均衡(Server Load Balance,SLB)伺服器負載Server
- 從零手寫實現 nginx-31-load balance 負載均衡介紹Nginx負載
- java B2B2C Springcloud電子商城系統--------負載均衡(Load Balance)JavaSpringGCCloud負載
- 解密負載均衡技術和負載均衡演算法解密負載演算法
- ORACLE 11G負載均衡測試Oracle負載
- 【知識分享】四層負載均衡和七層負載均衡負載
- 代理和負載均衡概述負載
- 負載均衡和動態負載均衡分別是什麼?-VeCloud負載Cloud
- 負載均衡負載
- Nginx負載均衡的max_fails和fail_timeout的預設配置問題Nginx負載AI
- dubbo叢集和負載均衡負載
- gRPC負載均衡(客戶端負載均衡)RPC負載客戶端
- gRPC負載均衡(自定義負載均衡策略)RPC負載
- NGINX 負載均衡Nginx負載
- WebSocket負載均衡Web負載
- IP負載均衡負載
- nginx負載均衡Nginx負載
- 【Nginx】負載均衡Nginx負載
- Oracle RAC Load BalanceOracle
- 負載均衡是什麼?怎麼理解負載均衡的部署方式和工作原理負載
- 【Linux】叢集和負載均衡Linux負載
- [WK-T]ORACLE 10G 配置負載均衡(LoadBalance)Oracle 10g負載
- 負載均衡技術(一)———負載均衡技術介紹負載
- sqlserver2005資料庫映象 的switch over 和fail overSQLServer資料庫AI
- 負載均衡技術(二)———常用負載均衡服務介紹負載
- dubbo容錯機制和負載均衡負載
- CDN和負載均衡的基本瞭解負載
- 剖析HBase負載均衡和效能指標負載指標
- 【Nginx】Nginx反向代理和負載均衡部署Nginx負載
- 伺服器叢集和負載均衡伺服器負載
- 簡述負載均衡和CDN技術負載
- Azure Load Balancer(一) 為我們的Web專案提供負載均衡Web負載
- 淺談負載均衡負載
- 漫談負載均衡負載
- Nginx負載均衡模式Nginx負載模式
- 面試之負載均衡面試負載