Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

5

积分

0

好友

2

主题
1#
发表于 2013-12-31 22:06:02 | 查看: 6520| 回复: 5
本帖最后由 刷到报废 于 2013-12-31 22:06 编辑


大家好,今天游走工地搬砖的时候发现一个问题,查了写资料,还是不太明白,这里向大伙儿恳求详解:


环境描述:
环境是Oracle Database 10.2.0.3的双节点RAC,部署的时候,DBCA顺手建了TAF,节点一首选,节点2是可用,TAF类型是BASIC,我没有做其他的配置,比如在数据库参数里配置local listner,
之后我给给客户端的tnsnames.ora粘贴了一份服务端的TAF部分,我可以用sqlplus或者pl/sql developer通过rac_taf连接上实例,
但是我没有做关闭节点看效果的测试.
粘贴一段配置
  1. RAC_TAF =
  2.   (DESCRIPTION =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = 100.86.000.00*)(PORT = 1521))
  4.     (ADDRESS = (PROTOCOL = TCP)(HOST = 100.10.000.00*)(PORT = 1521))
  5.     (LOAD_BALANCE = yes)
  6.     (CONNECT_DATA =
  7.       (SERVER = DEDICATED)
  8.       (SERVICE_NAME =rac_taf)
  9.       (FAILOVER_MODE =
  10.         (TYPE = SELECT)
  11.         (METHOD = BASIC)
  12.         (RETRIES = 180)
  13.         (DELAY = 5)
  14.       )
  15.     )
  16.   )
复制代码


之后客户的开发团队说他们的中间件weblogic在连上库之后,执行一两个操作,四五分钟,就会断开
  1. Io 异常: The Network Adapter could not establish the connection  
复制代码
用另外个service_name可以连,就是非taf的,service_name=rac,也是会断开,
报错如下:
  1. java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
复制代码
他使用的连接字符串如下:
  1. jdbc:oracle:thin:(
  2. DESCRIPTION =
  3. (ADDRESS_LIST =
  4. (ADDRESS=(PROTOCOL=TCP)(HOST=100.86.000.00*)(PORT=1521))
  5. (ADDRESS=(PROTOCOL=TCP)(HOST=100.10.000.00*)(PORT=1521) )
  6. (load_balance=yes)
  7. (failover=yes) )
  8. (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME= rac )
  9. )
  10. )
复制代码
(

还有:
  1. jdbc:oracle:thin:(
  2.   DESCRIPTION =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = 100.86.000.00*)(PORT = 1521))
  4.     (ADDRESS = (PROTOCOL = TCP)(HOST = 100.10.000.00*)(PORT = 1521))
  5.     (LOAD_BALANCE = yes)
  6.     (CONNECT_DATA =
  7.       (SERVER = DEDICATED)
  8.       (SERVICE_NAME = rac_taf)
  9.       (FAILOVER_MODE =
  10.         (TYPE = SELECT)
  11.         (METHOD = BASIC)
  12.         (RETRIES = 180)
  13.         (DELAY = 5)
  14.       )
  15.     )
  16.   )
复制代码


我查了查资料,说10g的TAF不支持jdbc thin的方式连接,想向各位前辈求证一下这种说法的正确性?
以及11G和12C的支持情况,是不是如果用jdbc的话,服务端配置TAF就是没有意义的?
还有就是这个场景下,客户的weblogic的频繁断开会可能是什么原因?
这个链接字符串的标准写法是怎样的?因为看帖子说,就算不适用taf,字符串里面也是不需要写LB和FO这些参数的.
很迷惑,
如果各位有时间帮忙解答一下,有文档地址就更好了.
拜谢.(在辛苦发帖的时候...又断了...)
2#
发表于 2013-12-31 22:36:30
FAQ: JDBC Drivers and Failover Mechanisms (FCF, TAF, SCAN) (Doc ID 1080674.1)

回复 只看该作者 道具 举报

3#
发表于 2013-12-31 22:42:21
你的问题,这个回答更加清晰吧:
Can the JDBC Thin Driver Do Failover by Specifying FAILOVER_MODE? (Doc ID 465423.1)

You have a 2-node RAC database. You ask if the JDBC Thin driver can do failover when using the following connect information.
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = rac1vip)(PORT = 1525)) (ADDRESS = (PROTOCOL =
TCP)(HOST = rac2vip)(PORT = 1525)) (LOAD_BALANCE = on)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ractest)
(FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 2) (DELAY = 1))))
FIX
No. JDBC Thin cannot use FAILOVER_MODE. The failover defined by FAILOVER_MODE is Transparent Application Failover (TAF). JDBC Thin does not support TAF.
However JDBC Thin does support Fast Connection Failover (FCF).

回复 只看该作者 道具 举报

4#
发表于 2013-12-31 23:16:04
lunar 发表于 2013-12-31 22:42
你的问题,这个回答更加清晰吧:
Can the JDBC Thin Driver Do Failover by Specifying FAILOVER_MODE? (Do ...

那意思是JDBC的FO在TAF和FCF都不支持,那可以从连接字符串里面取消掉了吧?看到有的jdbc连接字符串里面还是会有一句fileover=yes?

回复 只看该作者 道具 举报

5#
发表于 2014-1-1 00:30:47
failover缺省就是yes,不带mode的一堆就是FCF,带了就是TAF,因此你的改为下面的,用FCF就行了吧:
jdbc:oracle:thin:(
  DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 100.86.000.00*)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 100.10.000.00*)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rac_taf)
    )
  )

回复 只看该作者 道具 举报

6#
发表于 2014-1-1 20:16:13
lunar 发表于 2014-1-1 00:30
failover缺省就是yes,不带mode的一堆就是FCF,带了就是TAF,因此你的改为下面的,用FCF就行了吧:
jdbc:or ...

小M多谢女神~

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-21 10:13 , Processed in 0.047628 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569