oracle 11gr2 rac service-side taf 配置示例
how to configure server side transparentapplication failover [id 460982.1]
[oracle@db1 bin]$ ./srvctl add service -d orcl -s server_taf -r orcl1,orcl2 -p basic
--这里的orcl是database name,,orcl1和orcl2 是instance name。
[oracle@db1 bin]$ ./srvctl start service -d orcl -s server_taf
[oracle@db1 bin]$ ./srvctl config service -d orcl
service name: server_taf
service is enabled
server pool: orcl_server_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: orcl1,orcl2
available instances:
sql> select name,service_id from dba_services where name = 'server_taf';
name service_id
--------------------------------------------------------------------------
server_taf 3
sql> execute dbms_service.modify_service (service_name => 'server_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);
6. 确认参数修改:
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'
sql> select name, failover_method,failover_type, failover_retries,goal, clb_goal,aq_ha_notifications from dba_services where service_id = 3;
name method type retries goal clb_goal aqnot
--------------- ----------- ------------------ ---------- -------- -----
server_taf basic select 180 none long yes
sql>