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

转载 2013年12月03日 17:10:19

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

 

相关的理论说明,参考如下Blog:

Oracle RACFailover 详解

http://blog.csdn.net/tianlesoftware/article/details/5340788

 

How To Configure Server Side TransparentApplication Failover [ID 460982.1]

 

 

1.创建TAFService

[oracle@db1 bin]$ ./srvctl add service -d orcl -s server_taf -r "orcl1,orcl2" -P BASIC

 

--这里的orcl是database name,orcl1和orcl2 是instance name。

 

2. 启动server_taf服务

[oracle@db1 bin]$ ./srvctl start service -d orcl -s server_taf

 

3. 检查service运行情况

[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:

 

4.确认serviceID

 

SQL> select name,service_id from dba_services where name = 'server_taf';

 

NAME                                                            SERVICE_ID

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

server_taf                                                               3

 

5.service添加参数:

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>

 

7. 检查service注册情况:

 

[oracle@db1 bin]$ lsnrctl services

 

LSNRCTL for Linux: Version 11.2.0.3.0 -Production on 15-JUL-2012 13:26:43

 

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

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db1)(PORT=1521)))

Services Summary...

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

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

   Handler(s):

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

        LOCAL SERVER

Service "orcl" has 1 instance(s).

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

   Handler(s):

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

        LOCAL SERVER

Service "orclXDB" has 1instance(s).

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

   Handler(s):

     "D000" established:0 refused:0 current:0 max:1022 state:ready

        DISPATCHER <machine: db1, pid: 2167>

        (ADDRESS=(PROTOCOL=tcp)(HOST=db1.tianlesoftware.com)(PORT=38731))

Service "server_taf" has 1instance(s).

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

   Handler(s):

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

        LOCAL SERVER

The command completed successfully

 

 

8. 客户端就可以使用Service-SideTAF了:

 

在客户端TNS 配置:

orcl =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST= orcl.tianlesoftware.com)(PORT=1521))
(CONNECT_DATA=

       (SERVER=DEDICATED)

(SERVICE_NAME=server_taf )

)
)

-- orcl.tianlesoftware.comSCAN IP地址。

 

9.查看进程状态

[oracle@db1 bin]$ ./crs_stat -t

Name           Type           Target    State    Host       

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

ora.DATA.dg    ora....up.type ONLINE    ONLINE   db1 

ora.FRA.dg     ora....up.type ONLINE    ONLINE   db1 

ora....ER.lsnr ora....er.type ONLINE    ONLINE   db1 

ora....N1.lsnr ora....er.type ONLINE    ONLINE   db2 

ora....N2.lsnr ora....er.type ONLINE    ONLINE   db1 

ora....N3.lsnr ora....er.type ONLINE    ONLINE   db1 

ora.OCR.dg     ora....up.type ONLINE    ONLINE   db1 

ora.asm        ora.asm.type   ONLINE   ONLINE    db1 

ora....SM1.asm application    ONLINE   ONLINE    db1 

ora....01.lsnr application    ONLINE   ONLINE    db1 

ora....-01.gsd application    OFFLINE  OFFLINE              

ora....-01.ons application    ONLINE   ONLINE    db1 

ora....-01.vip ora....t1.type ONLINE    ONLINE   db1 

ora....SM2.asm application    ONLINE   ONLINE    db2 

ora....02.lsnr application    ONLINE   ONLINE    db2 

ora....-02.gsd application    OFFLINE  OFFLINE              

ora....-02.ons application    ONLINE   ONLINE    db2 

ora....-02.vip ora....t1.type ONLINE    ONLINE   db2 

ora.cvu        ora.cvu.type   ONLINE   ONLINE    db1 

ora.gsd        ora.gsd.type   OFFLINE  OFFLINE              

ora....network ora....rk.type ONLINE    ONLINE   db1 

ora.oc4j       ora.oc4j.type  ONLINE   ONLINE    db1 

ora.ons        ora.ons.type   ONLINE   ONLINE    db1 

ora.orcl.db    ora....se.type ONLINE    ONLINE   db1 

ora....taf.svc ora....ce.type ONLINE    ONLINE   db1 

ora.scan1.vip  ora....ip.type ONLINE    ONLINE   db2 

ora.scan2.vip  ora....ip.type ONLINE    ONLINE   db1 

ora.scan3.vip  ora....ip.type ONLINE    ONLINE   db1 

 

 

 

相关文章推荐

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

相关的理论说明,参考如下Blog:Oracle RACFailover 详解http://blog.csdn.net/tianlesoftware/article/details/5340788 Ho...

Oracle 11gR2 RAC LoadBalancing and TAF

本例中使用命令行形式添加services,以下是官方文档对services的描述: Oracle Database 10g introduced an automatic workload mana...

Oracle 11gR2 RAC 单网卡 转 双网卡绑定 配置步骤

之前写过一篇双网卡绑定的文章,如下:Oracle RAC 与 网卡绑定http://blog.csdn.net/tianlesoftware/article/details/6189639 Oracl...

Oracle 11gR2构建RAC之(2)--配置共享存储

Oracle 11gR2构建RAC之(2)--配置共享存储系统环境:操作系统:RedHat EL5Cluster: Oracle GI(Grid Infrastructure)Oracle:  Ora...
  • lqx0405
  • lqx0405
  • 2015年03月31日 12:03
  • 3063

Oracle RAC系列:如何为Oracle 11gR2 Grid 配置Linux DNS

首先下载Bind软件包,然后安装:   [root@rac1 named]# rpm -qa|grep bind bind-9.2.4-24.EL4 ypbind-1.17.2-13 bin...

ORACLE 11GR2 RAC的网络规划解析

ORACLE 11GR2 RAC的网络规划解析 2012-06-13 09:31:06 标签:ORACLE RAC的网络规划 原创作品,允许转载,转载时请务必以超链接形式标明文章 原...

修改Oracle 11gR2 RAC SCAN监听和本地监听端口

修改SCAN监听的端口将SCAN监听的端口修改为3521,本地监听的端口不变,依然为1521:[root@web1 ~]# srvctl modify scan_listener -p 3521修改后...

oracle 11gR2 RAC root.sh 错误 ORA-15072 ORA-15018

Oracle  11gR2 RAC 安装Clusterware 结束, 在第二个节点执行root.sh脚本的是报如下错误:   DiskGroup DATA1 creation failed wi...

Oracle 11gR2 RAC 新特性说明 收藏

一.    官网介绍 Oracle Database 11g Release 2 (11.2.0.2) New Features in Oracle RAChttp://download.oracle...

oracle 11gR2RAC修改public ip (同网段)

同网段修改public ip 规划将rac1的ip由118改为188,rac2的ip由119该为189网段不变 查看集群状态 [grid@rac1 ~]$ crsctl stat res -t -...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Oracle 11gR2 RAC Service-Side TAF 配置示例
举报原因:
原因补充:

(最多只允许输入30个字)