(服务端均衡负载)How To Configure Server Side Transparent Application Failover (文档 ID 460982.1)
目的:
不通过scan,实现服务端均衡负载
1.添加服务 (oracle 用户执行)
srvctl add service -d mtest -s jcservice -r "mtest1,mtest2" -P BASIC
--这里的mtest是database name,mtest1和mtest2 是instance name.
2.启动 jcservice 服务
srvctl start service -d mtest -s jcservice
3.检查 jcservice 运行状态
srvctl config service -d mtest
[oracle@rac1 ~]$ srvctl config service -d mtest
Service name: jcservice
Service is enabled
Server pool: mtest_jcservice
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: mtest1,mtest2
Available instances:
4.给service 添加参数
execute dbms_service.modify_service
(
service_name => 'jcservice',
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_name
The name of the service limited to 64 characters in the Data Dictionary
aq_ha_notifications
Determines whether HA events are sent via AQ for this service
failover_method
The TAF failover method for the service
failover_type
The TAF failover type for the service
failover_retries
The TAF failover retries for the service
failover_delay
The TAF failover delay for the service
clb_goal
Method used for Connection Load Balancing (see Table 95-2, "Constants used in Connection Balancing Goal Arguments")
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 = 'jcservice';
6.检查service
lsnrctl services
7.实现服务端均衡负载
目的:
不通过scan,实现服务端均衡负载
1.添加服务 (oracle 用户执行)
srvctl add service -d mtest -s jcservice -r "mtest1,mtest2" -P BASIC
--这里的mtest是database name,mtest1和mtest2 是instance name.
2.启动 jcservice 服务
srvctl start service -d mtest -s jcservice
3.检查 jcservice 运行状态
srvctl config service -d mtest
[oracle@rac1 ~]$ srvctl config service -d mtest
Service name: jcservice
Service is enabled
Server pool: mtest_jcservice
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: mtest1,mtest2
Available instances:
4.给service 添加参数
execute dbms_service.modify_service
(
service_name => 'jcservice',
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_name
The name of the service limited to 64 characters in the Data Dictionary
aq_ha_notifications
Determines whether HA events are sent via AQ for this service
failover_method
The TAF failover method for the service
failover_type
The TAF failover type for the service
failover_retries
The TAF failover retries for the service
failover_delay
The TAF failover delay for the service
clb_goal
Method used for Connection Load Balancing (see Table 95-2, "Constants used in Connection Balancing Goal Arguments")
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 = 'jcservice';
6.检查service
lsnrctl services
7.实现服务端均衡负载
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7569309/viewspace-2146120/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7569309/viewspace-2146120/