ITPub博客

首页 > 数据库 > Oracle > 11gr2 RAC配置Service-Side TAF

11gr2 RAC配置Service-Side TAF

原创 Oracle 作者:renjixinchina 时间:2014-02-26 17:51:11 0 删除 编辑

10g可以用dbca 来配置TAF 11.2以后只能通过命令和EM方式来实现,命令方式试验结果如下:

1 创建TAF服务

srvctl add service -d orcl -s orcl_taf -r "orcl1,orcl2" -P BASIC

2 启动TAF服务

srvctl start service -d orcl -s orcl_taf

 

3 修改service 参数

execute dbms_service.modify_service (service_name => 'orcl_taf', aq_ha_notifications => true, failover_method => dbms_service.failover_method_basic, failover_type => dbms_service.failover_type_select, failover_retries => 181,failover_delay => 5,clb_goal => dbms_service.clb_goal_long);

 

4 查询是否设置成功

SQL> select name, failover_method, failover_type, failover_retries,goal, clb_goal,aq_ha_notifications  from dba_services where service_id =4;

 

NAME

----------------------------------------------------------------

FAILOVER_METHOD

----------------------------------------------------------------

FAILOVER_TYPE

----------------------------------------------------------------

FAILOVER_RETRIES GOAL         CLB_G AQ_

---------------- ------------ ----- ---

orcl_taf

BASIC

SELECT

             180 NONE         LONG  YES

 

5 检查服务注册情况

[grid@node1 ~]$ lsnrctl services

 

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-FEB-2014 09:21:34

 

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

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))

Services Summary...

Service "+ASM" has 1 instance(s).

  Instance "+ASM1", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         LOCAL SERVER

Service "orcl" has 1 instance(s).

  Instance "orcl1", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         LOCAL SERVER

Service "orcl_taf" has 1 instance(s).

  Instance "orcl1", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0 state:ready

         LOCAL SERVER

The command completed successfully

6 配置一个tnsnames

ORCL_TAF =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = scanip)(PORT = 1521))

    (CONNECT_DATA =

      (SERVICE_NAME = orcl_taf)

    )

  )

 

 

7 测试

SQL> select host_name,instance_name from v$instance;

 

HOST_NAME

----------------------------------------------------------------

INSTANCE_NAME

----------------

node1

orcl1

SQL> /

 

HOST_NAME

----------------------------------------------------------------

INSTANCE_NAME

----------------

node2

orcl2

 

关闭该节点

srvctl stop instance -d orcl -i orcl1 -o immediate

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15747463/viewspace-1092913/,如需转载,请注明出处,否则将追究法律责任。

上一篇: SHOW_SPACE存储过程
下一篇: TAF 与JDBC
请登录后发表评论 登录
全部评论

注册时间:2011-01-30

  • 博文量
    373
  • 访问量
    2060942