The most outstanding performance of Oracle RAC clusters is high availability, which mainly includes load balance and failover. These technologies enable single point of failure (spof) to prevent normal access to the database by client applications, and load balancing between nodes by creating a service. This article describes the Oracle failover test in the Oracle 10g rac environment.
The following are some reference links for this purpose:
For the load balancing configuration, see
Non-Default port listening configuration in oracle rac (listener. ora tnsnames. ora)
Load Balance)
Oracle RAC server connection Load Balance)
Oracle RAC load balancing test (combined with server and client)
1. Several Methods of Oracle failover
Oracle failover is also called failover. It starts from Oracle 10 GB and can be divided into three methods:
A. Client-Side Connect time Failover
The client connection mode is failover. This mode is relatively simple. Once the rac cluster is installed, it is enabled by default.
B. TAF
Transparent failover. This method is also based on the client. You need to configure the client tnsnames. ora. When a connection failure occurs, you do not need to reconnect.
C. Service-Side TAF
Transparent failover on the server side is implemented by configuring the service, and no configuration is required on the client.
This article mainly demonstrates the first scenario: How to Implement failover when the client initiates a connection request
Note: you cannot set GLOBAL_NAME In the listener. ora file.
This parameter disables Connect-time Failover and Transparent Application Failover.
2. Client-Side Connect time Failover
The following official description of Client-Side Connect time Failover from Oracle: ID 453293.1
The connect-time failover enables clients to connect to another listener if the initial connection to the first
Listener fails. The number of listener protocol addresses determines how many listeners are tried.
Connect-time failover, Oracle Net attempts a connection with only one listener. The default is on.
Tnsnames Parameter: FAILOVER
(Failover = on) is default for ADDRESS_LISTs, DESCRIPTION_LISTs, and a set
DESCRIPTIONs., therefore, you do not have to specify it explicitly.
Client-based failover is easier to understand. If the client has multiple VIPs in tnsnames. ora, the client first requests to locate the first VIP. If the first VIP is not
If yes, continue to use the next VIP until the connection is established successfully. If no VIP connection is established, the system will receive an error message.
Generally, we use vip as the connection address in tnsnames. ora.
3. server and client Environments
# Server environment and host information
Oracle @ bo2dbp: ~> Cat/etc/hosts | grep vip
192.168.7.61 bo2dbp-vip.2gotrade.com bo2dbp-vip
192.168.7.62 bo2dbs-vip.2gotrade.com bo2dbs-vip
# Server environment and cluster information
Oracle @ bo2dbp: ~> ./Crs_stat.sh
Resource name Target State
-------------------------
Ora. GOBO4.GOBO4A. inst ONLINE on bo2dbp
Ora. GOBO4.GOBO4B. inst ONLINE on bo2dbs
Ora. GOBO4.db ONLINE on bo2dbp
Ora. bo2dbp. ASM1.asm ONLINE on bo2dbp
Ora. bo2dbp. LISTENER_BO2DBP.lsnr ONLINE on bo2dbp
Ora. bo2dbp. LISTENER_ORA10G_BO2DBP.lsnr ONLINE on bo2dbp
Ora. bo2dbp. gsd ONLINE on bo2dbp
Ora. bo2dbp. ons ONLINE on bo2dbp
Ora. bo2dbp. vip ONLINE on bo2dbp
Ora. bo2dbs. ASM2.asm ONLINE on bo2dbs
Ora. bo2dbs. LISTENER_BO2DBS.lsnr ONLINE on bo2dbs
Ora. bo2dbs. LISTENER_ORA10G_BO2DBS.lsnr ONLINE on bo2dbs
Ora. bo2dbs. gsd ONLINE on bo2dbs
Ora. bo2dbs. ons ONLINE on bo2dbs
Ora. bo2dbs. vip ONLINE on bo2dbs
Ora. ora10g. db ONLINE on bo2dbp
# Client environment
Robin @ SZDB: ~> Cat/etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64)-Kernel \ r (\ l ).
Robin @ SZDB: ~> Sqlplus-v
SQL * Plus: Release 10.2.0.3.0-Production
# Client tnsnames Configuration
GOBO4 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.61) (PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.62) (PORT = 1521 ))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = GOBO4)
)
)