support TAF . TAF is only supported by the
JDBC OCI driver .
Transparent Application Failover (TAF) is a feature of the Java Database
Connectivity (JDBC) Oracle Call Interface (OCI) driver. It enables the
application to automatically reconnect to a database, if the database instance
to which the connection is made fails. In this case, the active transactions
roll back.
When an instance to which a connection is established fails or is shutdown,
the connection on the client side becomes stale and would throw exceptions to
the caller trying to use it. TAF enables the application to transparently
reconnect to a preconfigured secondary instance creating a fresh connection, but
identical to the connection that was established on the first original instance.
That is, the connection properties are the same as that of the earlier
connection. This is true regardless of how the connection was lost.
大概意思就是说jdbc thin连接rac时,不支持rac failover 的TAF;只有 jdbc OCI支持rac failover
的TAF;如果是jdbc thin连接rac时建议FCF:
FCF 配置demo如下:
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))))
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).
大概意思仍然说JDBC Thin不支持rac TAF failover
mode;而是支持fcf,
网友lunar:
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)
)
)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13750068/viewspace-1143118/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13750068/viewspace-1143118/