关于文档上RAC 的 FAILOVER_MODE
(急,过两天就上线,正要给开发人员新的连接方式)
看了文档,还有点迷惑:
1.RETRIES是说建立连接后,实例失败后,连到别的实例的尝试次数吗?还是尝试连接原来失败实例的次数?
2.设置RETRIES和delay有什么意义吗?RETRIES和delay是设置大一些好,还是小一些好呢?看很多文档,包括oracle的,设置的都不一样。是不是设不设都无所谓呢
RETRIES
Specify the number of times to attempt to connect after a failover. If DELAY is specified, RETRIES defaults to five retry attempts.
Note: If a callback function is registered, then this subparameter is ignored.
DELAY
Specify the amount of time in seconds to wait between connect attempts. If RETRIES is specified, DELAY defaults to one second.
Note: If a callback function is registered, then this subparameter is ignored.
Example: TAF with Connect-Time Failover and Client Load Balancing
Implement TAF with connect-time failover and client load balancing for multiple addresses. In the following example, Oracle Net connects randomly to one of the protocol addresses on sales1-server or sales2-server. If the instance fails after the connection, the TAF application fails over to the other node's listener, reserving any SELECT statements in progress.
sales.us.acme.com=
(DESCRIPTION=
(LOAD_BALANCE=on)
(FAILOVER=on)
(ADDRESS=
(PROTOCOL=tcp)
(HOST=sales1-server)
(PORT=1521))
(ADDRESS=
(PROTOCOL=tcp)
(HOST=sales2-server)
(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.acme.com)
(FAILOVER_MODE=
(TYPE=select)
(METHOD=basic))))
Example: TAF Retrying a Connection
TAF also provides the ability to automatically retry connecting if the first connection attempt fails with the RETRIES and DELAY parameters. In the following example, Oracle Net tries to reconnect to the listener on sales1-server. If the failover connection fails, Oracle Net waits 15 seconds before trying to reconnect again. Oracle Net attempts to reconnect up to 20 times.
sales.us.acme.com=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcp)
(HOST=sales1-server)
(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.acme.com)
(FAILOVER_MODE=
(TYPE=select)
(METHOD=basic)
(RETRIES=20)
(DELAY=15))))
[ 本帖最后由 lixunpeng 于 2010-4-20 13:37 编辑 ]
|