TAF Subparameters Parameter Description
SRV8 =
(DESCRIPTION =
(ADDRESS=
(PROTOCOL=TCP)(HOST=ORADB1-VIP.SUMSKY.NET)(PORT=1521))
(PROTOCOL=TCP)(HOST=ORADB2-VIP.SUMSKY.NET)(PORT=1521))
(PROTOCOL=TCP)(HOST=ORADB3-VIP.SUMSKY.NET)(PORT=1521))
(PROTOCOL=TCP)(HOST=ORADB4-VIP.SUMSKY.NET)(PORT=1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME=SSKYDB)
(FAILOVER_MODE=
(BACKUP=SRV8_PRECONNECT)
(TYPE=SELECT)
(METHOD=PRECONNECT)(RETRIES=180)(DELAY=5)))
SRV8_PRECONNECT=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)(HOST=ORADB1-VIP.SUMSKY.NET)(PORT=1521))
(PROTOCOL=TCP)(HOST=ORADB2-VIP.SUMSKY.NET)(PORT=1521))
(PROTOCOL=TCP)(HOST=ORADB3-VIP.SUMSKY.NET)(PORT=1521))
(PROTOCOL=TCP)(HOST=ORADB4-VIP.SUMSKY.NET)(PORT=1521))
(CONNECT_DATA=
(SERVER = DEDICATED)
(SERVICE_NAME=SRV8_PRECONNECT)
(FAILOVER_MODE=
(BACKUP=SRV8)
(TYPE=SELECT)
(METHOD=BASIC)(RETRIES=180)(DELAY=5)))
BACKUP Specifies a different net service name to establish the backup connection.
BACKUP should be specified when using PRECONNECT to preestablish
connections. Specifying a BACKUP is strongly recommended
for BASIC methods; otherwise, reconnection may first attempt the
instance that has just failed, adding delay until the client reconnects.
TYPE Specifies the type of failover. Two types of Net failover functionality
are available by default:
SESSION: Fails over the session. With this option only connection is
established; no work in progress is transferred from the failed instance
to the available instance. --不支持当前执行事务在failover之后在另外的节点必须要rollback, select执行到一半时,也必须重新执行,不能接着已出来的数据执行.
SELECT: Enables a user with open cursors to continue fetching on
them after failure. SQL*Net keeps track of any SELECT statements
issued in the current transaction. It also keeps track of how many rows
have been fetched by the client for each cursor associated with a
SELECT statement. If connection to the instance is lost, SQL*Net
establishes a connection to another instance and reexecutes the
SELECT statement from the point of failure.
--不支持当前执行事务在failover之后在另外的节点必须要rollback, select执行到一半时,可以接着已出来的数据,继续执行到查出所以的数据.
METHOD Determines the speed of the failover from the primary to the secondary
or backup node.
BASIC: Connections are only established to the failed-over instance
when the failure happens.
PRECONNECT: This parameter preestablishes connections. If it is
used, connection to the backup instance is made at the same time as
the connection to the primary instance.--将在备库库同时也创建一个会话,以备切换
RETRIES Specifies the number of times to attempt to connect to the backup
node after a failure before giving up.
DELAY Specifies the amount of time in seconds to wait between attempts to
connect to the backup node after a failure before giving up.
The RETRIES and DELAY parameters are useful when thousands of users
are connected to the instance of the failed node and all these users have to
establish connections to the recovering node. In the case of a dedicated connection,
there is only a single thread to establish connections, and simultaneous
connection requests from a large number of users can cause
connection timeouts. The RETRIES and DELAY parameters help to retry the
connection with a delay between retries while trying to establish connections
to the failover node. This is less of an issue when the shared server is
configured, in which case Oracle establishes a pool of connections to the
instance, and each user uses of one of them to establish a connection to the
database. Because users are placed in a queue, when a connection becomes
available, the user establishes connection.
example:
SID =
(DESCRIPTION =
(FAILOVER=ON)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IP_1)(PORT = 3401))
(ADDRESS = (PROTOCOL = TCP)(HOST = IP_2(PORT = 3402))
(LOAD_BALANCE=OFF)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = service_sid)
( FAILOVER_MODE=
(TYPE=SELECT)
(METHOD=BASIC)
(RETRIES=3))
)
)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10834762/viewspace-440382/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10834762/viewspace-440382/
本文详细解析了Oracle数据库的高可用配置参数,包括TAF、SRV8、SRV8_PRECONNECT等子参数的使用,以及如何通过FAILOVER_MODE参数确保数据库在实例故障时能够快速切换至备用实例,保持业务连续性。文章还介绍了不同类型失败转移的功能差异,如SESSION和SELECT模式的区别,以及预连接方法如何提高故障转移速度。
1946

被折叠的 条评论
为什么被折叠?



