Oracle 11gR2 Server-Site TAF (Transaction Application Failover) Configuration:

# Create a service
srvctl add service -d RACDB -s RACDB_TAF -r "RACDB1,RACDB2,RACDB3" -P BASIC -m BASIC -z 180 -w 5 -q TRUE -e SESSION


# Start the service
srvctl start service -d RACDB -s RACDB_TAF


# Check the sevice
srvctl config service -d RACDB -S RACDB_TAF

Service name: RACDB_TAF
Service is enabled
Server pool: RACDB_RACDB_TAF
Cardinality: 3
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: true
Failover type: SESSION
Failover method: BASIC
TAF failover retries: 180
TAF failover delay: 5
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Preferred instances: RACDB1,RACDB2,RACDB3
Available instances:


[oracle@RACDB01 ~]$ srvctl status service -d RACDB -s RACDB_TAF
Service RACDB_TAF is running on instance(s) RACDB1,RACDB2,RACDB3


select service_id,name,failover_method,failover_type,failover_retries,failover_delay,aq_ha_notifications
from dba_services
where name = 'RACDB_TAF';

SERVICE_ID NAME FAILOVER_MODE FAILOVER_TYPE FAILOVER_RETRIES FAILOVER_DELAY AQ_HA_NOTIFICATIONS
---------- ---------- ---------- ---------- ---------------- -------------- -------------------
5 RACDB_TAF BASIC SESSION 180 5 YES

select inst_id,service_id,name from gv$active_services
where name = 'RACDB';
order by 1;

INST_ID SERVICE_ID NAME
---------- ---------- ------------------------------
1 5 RACDB_TAF
2 5 RACDB_TAF
3 5 RACDB_TAF

 


# tnsnames.ora setting on Client Site

RACDB_OLTP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = RACDB-Scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RACDB_TAF)
)
)

 


# remove the service

srvctl remove service -d RACDB -s RACDB_TAF

sqlplus / as sysdba
exec dbms_service.delete_service('RACDB_TAF');

 

 

arrow
arrow
    全站熱搜

    DanBrother 發表在 痞客邦 留言(0) 人氣()