亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle 11gR2 RAC Service-Side TAF 配置示例

發布時間:2020-07-14 19:39:07 來源:網絡 閱讀:724 作者:Jeff丶 欄目:關系型數據庫

Service-Side TAF
Service-Side TAF的配置參考:
How To Configure Server Side Transparent Application Failover [ID 460982.1]
Service-SideTAF 可以看作是TAF的一種變種,首先Service-SideTAF也是TAF,所有TAF的特點它都有,其次這種TAF是在服務器上配置的,而不像TAF是在客戶端配置的。
Client-Side TAF 是在客戶端修改tnsnames.ora 文件來配置的,如果有很多客戶端使用這個數據庫,那么每次微笑調整都需要把所有的計算機更改一遍,既低效又容易出錯。而Service-Side TAF 通過結合Service,在數據庫里保存FAIL_MODE的配置,把所有的TAF配置保存在數據字典中,從而省去了客戶端的配置工作,現在客戶端的TNS文件就不需要任何TAF的配置選項了。
從配置參數而言,Service-Side TAF和TAF 相比多了一個Instance Role(實例角色)的概念。 所謂的實例角色,就是當有多個Instance 參與一個Service時,可以配置優先使用哪一個Instance為用戶提供服務。用戶共有兩種可選角色。
PREFERRED:首選實例,會優先選擇擁有這個角色的實例提供服務。
AVAILABLE: 后備實例,用戶連接會優先連接PREFFERRED的Instance,當PREFERRED的Instance不可用時,才會被轉到AVAILBALE的Instance上。
要使用Server-Side TAF必須配置Service。 Service 可以在創建數據庫時創建,也可以在創建數據庫之后修改,既可以使用dbca 配置向導,也可以用命令行的方式配置。

服務端不需要配置更改客戶端實現taf
方法1.客戶端配置 (METHOD = basic)節約資源、浪費時間
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.171.4)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.171.5)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(FAILOVER_MODE =
(TYPE = session)
(METHOD = basic)
(RETRIES = 180)
(DELAY = 5)
)
)
)

方法2.客戶端配置 (METHOD = preconnect)節約時間、浪費資源
orcl1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.171.4)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = preconnect)
(BACKUP = orcl2)
)
)
)
orcl2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.171.5)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = preconnect)
(BACKUP = orcl1)
)
)
)

由于客戶端要改太過麻煩,現在我們看下怎么不改客戶端,直接配置服務端
1.用srvctl 命令配置Service
[oracle@rac1]$srvctl add service -d orcl -s taf -r "orcl1,orcl2" -P BASIC
--這里的orcl是database name,orcl1和orcl2 是instance name。

刪除service
#srvctl remove service -d orcl -s taf

2.啟動taf服務
[oracle@rac1]srvctl start service -d orcl -s taf

2.1數據庫運行時自動運行service
srvctl enable service -d orcl -s taf

  1. 檢查service運行情況
    [oracle@rac1]srvctl config service -d orcl
    4.5.給service添加參數:

SQL> execute dbms_service.modify_service (service_name => '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);

刪除數據字典里的service信息
begin
dbms_service.delete_service(service_name=>'taf');
end;
/

5.確認修改的參數
col name format a15
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 where name = 'taf';
6.檢查service注冊情況:
[oracle@rac1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-DEC-2018 14:18:37

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER

Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 13-DEC-2018 09:09:32
Uptime 0 days 5 hr. 9 min. 5 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/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.171.2)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.171.4)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "taf" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully
7.客戶端就可以使用Service-SideTAF了:

在客戶端TNS 配置:

orcl =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST= 172.16.171.6)(PORT=1521))
(CONNECT_DATA=

   (SERVER=DEDICATED)

(SERVICE_NAME=taf )

)
)
--172.16.171.6是scan ip的地址

測試。。。。。。。。。。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

兴化市| 定兴县| 临泉县| 凤阳县| 宁强县| 蕲春县| 七台河市| 怀宁县| 三河市| 天气| 泌阳县| 东台市| 石渠县| 平山县| 当阳市| 阿瓦提县| 连平县| 武强县| 西和县| 高平市| 招远市| 怀化市| 子长县| 威宁| 本溪| 苏尼特左旗| 徐闻县| 清丰县| 山东省| 江阴市| 南安市| 杭锦后旗| 阜新| 卫辉市| 新沂市| 桐柏县| 伊宁市| 拉萨市| 晋江市| 紫阳县| 朝阳县|