ORACLE RAC TAF 配置(透明故障轉移)
TAF(Transparent Application Failover)即透明應用程式故障轉移技術。當初始化連線出現問題無法連線時,該功能可以保證應用程式重新連線到可用服務。在重新連線過程中,之前的活動事務將會被回滾,但在“具體條件”下TAF可以保證SELECT語句不被終止。這也是RAC亮點之一。
所謂的“具體條件”指的就是FAILOVER_MODE中METHOD選擇“BASIC”、TYPE選擇“SELECT”
TAF的特性:
1:TAF是ORACLE客戶端提供的一項特性,使用TAF,對客戶端的環境有一定的要求,比如JAVA的JDBC驅動、Oracle客戶端的版本等(8i開始支援TAF);
2:大致上TAF可以分為2種,連線時的TAF和會話建立後TAF;
3:TAF本身與是否RAC環境無關,但一般都用在RAC環境,最小程度的減少最應用的影響,單例項環境下也可以使用TAF,這樣使用PL/SQL developer連線資料庫,即使資料庫例項重啟,也不需要重新連線;
4:RAC環境下,還可以把TAF配置在伺服器端;
5:配置listener.ora檔案的GLOBAL_DBNAME引數後將會禁用TAF
檢視當前service
-
col name format a24
-
col failover_method format a11 heading 'METHOD'
-
col failover_type format a10 heading 'TYPE'
-
col failover_retries format 9999999 heading 'RETRIES'
-
col goal format a10
-
col clb_goal format a8
-
col AQ_HA_NOTIFICATIONS format a5 heading 'AQNOT'
- select name, failover_method,failover_type, failover_retries,goal, clb_goal,aq_ha_notifications from dba_services;
1. 客戶端TAF配置
-
vi tnsnames.ora
-
NODE =
-
(DESCRIPTION =
-
(ADDRESS_LIST =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.yang.com)(PORT = 1521))
-
)
-
(CONNECT_DATA =
-
(SERVICE_NAME = rac.yang.com)
-
(FAILOVER_MODE =
-
(TYPE = SELECT)
-
(METHOD = BASIC)
-
(RETRIES = 180)
-
(DELAY = 5))
-
)
-
)
-
SELECT MACHINE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER FROM V$SESSION WHERE SID=141;
-
MACHINE TYPE METHOD FAI
-------------------- ---------- ----------- ---
tay SELECT BASIC NO
2. 伺服器端TAF配置
2.1新增taf服務
srvctl add service -d cnposqa -s cnposqa_taf -r "cnposqa1,cnposqa2" -P BASIC
-e Failover type (NONE, SESSION, or SELECT)
-m Failover method (NONE or BASIC)
srvctl add service -d cnposqa -s cnposqa_taftt -r "cnposqa1,cnposqa2" -e select -m basic -P BASIC
2.2啟動服務
srvctl start service -d cnposqa -s cnposqa_taf
2.3檢查服務情況
> srvctl config service -d cnposqa -s cnposqa_taf
Service name: cnposqa_taf
Service is enabled
Server pool: cnposqa_cnposqa_taf
Cardinality: 2
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: cnposqa1,cnposqa2
Available instances:
2.3 給service新增引數(basic,select):
execute dbms_service.modify_service (service_name => 'cnposqa_taf' -
, aq_ha_notifications => true -
, failover_method => dbms_service.failover_method_basic -
, failover_type => dbms_service.failover_type_select -
, failover_retries => 180 -
, failover_delay => 5 -
, clb_goal => dbms_service.clb_goal_long);
++單邊服務新增
--cnposqa_taf2單邊服務,主節點cnposqa2, 副節點cnposqa1 (-r Preferred , -a Available )
srvctl add service -d cnposqa -s cnposqa_taf2 -r "cnposqa2" -a "cnposqa1" -P BASIC
config service -d cnposqa -s cnposqa_taf2
Service name: cnposqa_taf2
Service is enabled
Server pool: cnposqa_cnposqa_taf2
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: cnposqa2
Available instances: cnposqa1
切換測試
--停服務
stop service -d cnposqa -s cnposqa_taf2
--服務啟動到instance 1
start service -d cnposqa -s cnposqa_taf2 -i cnposqa1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17086096/viewspace-1872783/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC 客戶端故障轉移(failover) TAFOracle客戶端AI
- 理解透明應用程式故障轉移 (TAF) 和快速連線故障轉移 (FCF)
- 理解透明應用程式故障轉移 (TAF) 和快速連線故障轉移 (FCF) (文件 ID 1602113.1)
- 【RAC】RAC中的負載均衡和故障切換--TAF配置負載
- 配置 RAC 負載均衡與故障轉移負載
- Oracle RAC TAF [zt]Oracle
- Linux平臺上Oracle Rac中的TAF配置LinuxOracle
- [轉載]Oracle 10g RAC TAF介紹Oracle 10g
- Oracle 10g RAC TAFOracle 10g
- Oracle Failover - TAF 透明應用切換OracleAI
- Oracle RAC TAF 無縫failoverOracleAI
- Oracle RAC Failove 之二:TAFOracleAI
- rac 的Client-side TAF配置clientIDE
- 【TAF】使用Oracle RAC的TAF技術之SESSION型別OracleSession型別
- Oracle 11gR2 RAC Service-Side TAF 配置示例OracleIDE
- Oracle 10g RAC TAF介紹Oracle 10g
- Oracle RAC的TAF簡單測試Oracle
- [WK-T]ORACLE 10G 配置故障轉移(Failover)Oracle 10gAI
- oracle 11g rac TAF 測試方案Oracle
- 【TAF】使用Oracle RAC的TAF技術實現不間斷查詢Oracle
- keepalive配置mysql自動故障轉移MySql
- Oracle Dataguard故障轉移(failover)操作OracleAI
- 11gr2 RAC配置Service-Side TAFIDE
- Jdbc thin not suppot Rac TAFJDBC
- 在JDBC連線池中啟動Oracle RAC的TAFJDBCOracle
- Oracle RAC Failove 之三:Server-Side TAFOracleAIServerIDE
- Oracle Rman多通道故障轉移問題分析Oracle
- RAC_TNS故障轉移負載均衡、SCAN IP、VIP、PUBLIC IP負載
- ORACLE RAC GUARD故障排除——RAC GUARD概念和管理Oracle
- ORACLE9i 的透明閘道器的配置 (轉)Oracle
- RAC TAF 連線 (tnsnames.ora)
- 【ASK_ORACLE】手動配置DataGuard的自動化Client Failover(故障轉移)的serviceOracleclientAI
- ORACLE透明閘道器的配置Oracle
- CentOS 7.3 ECS上搭建RAC 18c+單例項DG+EMCC+DG的FSFO快速故障轉移配置CentOS單例
- 搭建Windows故障轉移群集Windows
- Oracle 10g RAC故障處理Oracle 10g
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- 各種主機部署故障轉移Failover的詳細配置AI