The ha of RAC is one of its big selling points, and Oracle often does it to advertise, but in fact, RAC is not really ha, because it is a share-disk architecture, only instance-level ha. The technical basis of the RAC instance-level HA is failover, which means that the failure of any node in the cluster will not affect the normal use of the user, and the user who is connected to the failed node will be automatically transferred to the health node, so the switch is transparent to the user.
The failover of RAC can be subdivided into the following 3 types:
1) client-side Connect time Failover
2) TAF (transparent application Failover)
3) Service-side TAF
Here's a look at the difference between these 3 kinds of failover:
Client-side Connect Time Failover
1. Define
Client-side connect time failover means: if more than one address is configured in the client Tnsname.ora, the user attempts to connect to the first address when sending a connection request, and if it fails, proceed to the second address. Until the success or traversal attempts all the addresses.
This failover mode only works at the time the connection is initiated, and once the connection is successful, the connection does not automatically failover to the other available nodes if the node fails. From the client's point of view: The session is disconnected and the user program must re-establish the connection.
2. Configure
Add the Failover=on entry in the client's Tnsname.ora, which defaults to on, which is the client default configuration failover.
3. Test
Test environment: Two-node RAC (O01RCD0A,O01RCD0B)
1 Configure client Tnsnames.ora
The editing client Tnsnames.ora is as follows:
O01RCD0 =
(DESCRIPTION =
(failover = ON)
(Address_list =
(address = (PROTOCOL = TCP) (HOST =wrong) (PORT = 1521))
(address = (PROTOCOL = TCP) (HOST = DRCDD0RB) (PORT = 1521))
(load_balance = yes)
)
(Connect_data =
(service_name = O01rcd0.world)
)
)
)
Deliberately write the wrong first address.