Service-side TAF
一、 檢查是否配置Service-side TAF
1、檢查是否配置了Service-side TAF
[grid@dou_rac2 ~]$ srvctl config service -d racdb
[grid@dou_rac2 ~]$
--無返回結果,說明沒有配置service
2、檢查監聽中是否註冊監聽了Service-side TAF 服務
[grid@dou_rac2 ~]$ lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-JUL-2013 17:34:42
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 26-JUL-2013 09:55:30
Uptime 0 days 7 hr. 39 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/dou_rac2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.223)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
--service未註冊到監聽中
二、新增Service-side TAF --oracle使用者執行
[oracle@dou_rac2 ~]$ srvctl add service -d racdb -s racdb_taf -r racdb1,racdb2 -P BASIC -e SELECT -m BASIC -w 10 -z 1000
三、檢查是否配置成功,未啟動則開啟服務
[oracle@dou_rac2 ~]$ srvctl config service -d racdb
服務名: racdb_taf
服務已啟用
伺服器池: racdb_racdb_taf
基數: 2
斷開連線: 假
服務角色: PRIMARY
管理策略: AUTOMATIC
DTP 事務處理: 假
AQ HA 通知: 假
故障轉移型別: SELECT
故障轉移方法: BASIC
TAF 故障轉移重試次數: 1000
TAF 故障轉移延遲: 10
連線負載平衡目標: LONG
執行時負載平衡目標: NONE
TAF 策略規範: BASIC
首選例項: racdb1,racdb2
可用例項:
檢視是否開啟Service-side TAF服務
[grid@dou_rac2 ~]$ srvctl status service -d racdb
服務 racdb_taf 未執行。
檢查LISTENER_SCAN1中也是否註冊了Service-side TAF服務
[grid@dou_rac2 ~]$ lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-JUL-2013 17:43:01
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 26-JUL-2013 09:55:30
Uptime 0 days 7 hr. 47 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/dou_rac2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.223)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
--監聽中未註冊Service-side TAF服務
開啟Service
[grid@dou_rac2 ~]$ srvctl start service -d racdb
檢視Service執行狀態
[grid@dou_rac2 ~]$ srvctl status service -d racdb
服務 racdb_taf 正在例項 racdb1 上執行
檢視LISTENER_SCAN1狀態
[grid@dou_rac2 ~]$ lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-JUL-2013 17:49:10
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 26-JUL-2013 09:55:30
Uptime 0 days 7 hr. 53 min. 39 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/dou_rac2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.223)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Service "racdb_taf" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
-- Service racdb_taf已經註冊到LISTENER_SCAN1
自動開啟service,資料庫啟動時自動開啟所有的service
[oracle@dou_rac2 admin]$ srvctl enable service -d racdb -s racdb_taf -i racdb1
[oracle@dou_rac2 admin]$ srvctl enable service -d racdb -s racdb_taf -i racdb2
--配置一個節點自動啟動service即可,當然2個也可以
重啟之後的service狀態
[grid@dou_rac2 ~]$ srvctl status service -d racdb
服務 racdb_taf 正在例項 racdb1,racdb2 上執行
[grid@dou_rac2 ~]$ lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-JUL-2013 18:44:17
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 26-JUL-2013 18:40:03
Uptime 0 days 0 hr. 4 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/dou_rac2/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.223)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdb_taf" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
四、修改客戶端tnsnames.ora
客戶端使用service-side TAF,需要修改一下tnsnames.ora
RACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dou_rac-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVICE = DEDICATED)
(SERVICE_NAME = racdb_taf)
)
)
--racdb修改成racdb_taf服務名
Service-side TAF測試
[oracle@dou_rac2 admin]$ sqlplus xiaoyu/oracle@racdb
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 26 17:56:45 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> show parameter service
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string racdb_taf
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-767327/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11gr2 RAC配置Service-Side TAFIDE
- Oracle 11gR2 RAC Service-Side TAF 配置示例OracleIDE
- Failover 之 Client-Side Connect time Failover、Client-Side TAF、Service-Side TAFAIclientIDE
- 【TAF】使用Oracle RAC的TAF技術之SESSION型別OracleSession型別
- Oracle RAC TAF [zt]Oracle
- Jdbc thin not suppot Rac TAFJDBC
- oracle的TAF淺析Oracle
- 【TAF】使用Oracle RAC的TAF技術實現不間斷查詢Oracle
- Oracle 10g RAC TAFOracle 10g
- LOAD_BALANCE&TAF總結
- Oracle RAC TAF 無縫failoverOracleAI
- RAC TAF 連線 (tnsnames.ora)
- Oracle RAC Failove 之二:TAFOracleAI
- Oracle LOAD_BALANCE&TAF總結Oracle
- ORACLE RAC TAF 配置(透明故障轉移)Oracle
- Oracle 10g RAC TAF介紹Oracle 10g
- rac 的Client-side TAF配置clientIDE
- Oracle RAC的TAF簡單測試Oracle
- 【UCP】理解TAF和FCF(重點是UCP)
- oracle 11g rac TAF 測試方案Oracle
- TNSNAMES TAF TEMPLATE , LOCAL_LISTENER RAC FAILOVERAI
- Oracle Failover - TAF 透明應用切換OracleAI
- [轉載]Oracle 10g RAC TAF介紹Oracle 10g
- How to Setup SCAN Listener and Client for TAF and Load Balancingclient
- oracle taf unknown 問題處理過程Oracle
- Linux平臺上Oracle Rac中的TAF配置LinuxOracle
- 在JDBC連線池中啟動Oracle RAC的TAFJDBCOracle
- Oracle RAC Failove 之三:Server-Side TAFOracleAIServerIDE
- Oracle RAC 客戶端故障轉移(failover) TAFOracle客戶端AI
- 【RAC】RAC中的負載均衡和故障切換--TAF配置負載
- oracle taf type型別為session和select的區別Oracle型別Session
- 物理DataGuard客戶端無縫切換--客戶端TAF 配置客戶端
- How to Configure TAF and Client Load Balancing in a Replicated Environment [ID 210596.1]client
- oracle10g rac(rhel4)_load balancing_taf(一)Oracle
- oracle10g rac(rhel4)_load balancing_taf(二)Oracle
- oracle10g rac(rhel4)_load balancing_taf(三)Oracle
- oracle10g rac(rhel4)_load balancing_taf(四)Oracle
- 靈活實現RAC三節點的負載均衡及TAF配置(五)負載