Oracle RAC failover test (Failover during connection)

Source: Internet
Author: User
Tags failover taf sqlplus

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 basic references or links for this purpose:
For load balancing and Oracle service configurations, see
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
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)
Oracle RAC failover test (TAF Mode)
Oracle RAC failover test (server TAF Mode)

1. Several Oracle failover methods are also called failover. Oracle 10 Gb can be divided into three methods:. client-side connect time failover client connection to the failover mode. This mode is relatively simple. Once the RAC cluster is installed, it is enabled by default. B. TAF transparent failover, which is also based on the client. You need to configure the client tnsnames. ora. You do not need to reconnect to C. service-side TAF transparent failover on the server side is achieved by configuring the service, and the client does not need any configuration. This article mainly demonstrates the first scenario, that is, how to implement failover when the client initiates a connection request. Note: it cannot be used in listener. set global_name in the ora file. This parameter will disable connect-time failover, transparent application failover2, and client-side connect time failover. The official description about client-side connect time failover from Oracle is ID 453293.1 connect-time failover enables clients to connect to another listener if the initial connection to the first listener fails. the number of listener protocol addres SES determines how does listeners are tried. without 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 of descriptions ., therefore, you do not have to specify it explicitly. client-based failover is easier to understand. For tnsnames. when ora has multiple VIPs, the client first requests to locate the first VIP. If the first VIP is not reachable, continue to use the next VIP until the connection is established successfully, if all VIPs cannot connect, the system will receive an error message. Generally, we use VIP as the connection address in tnsnames. ora. 3. server and client environment # server environment, 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, 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 ))) 4. connection test # establish a connection for the first time. At this time, the client establishes a connection from the first IP address configured by tnsnames, that is, the hostname and instance_name corresponding to 192.168.7.61 # VIP 192.168.7.61 They are bo2dbp and gobo4a respectively, so we get the following returned result: Robin @ szdb: ~> Sqlplus fail_over/fail @ gobo4 fail_over @ gobo4> Get verify. SQL 1 rem the following query is for TAF connection verification 2 Col Sid format 99999 3 Col serial # format 9999999 4 Col failover_type format A13 5 Col failover_method format A15 6 Col failed_over format A11 7 prompt 8 prompt failover status for current user 9 prompt ============================== =============== 10 select Sid, 11 serial #, 1 2 failover_type, 13 failover_method, 14 failed_over 15 from V $ session 16 Where username = 'fail _ over '; 17 REM the following query is for Load Balancing verification 18 Col host_name format A20 19 prompt 20 prompt current instance name and host name 21 prompt ========== =========================================== 22 * select instance_name, host_name from V $ instance; 23 fail_over @ gobo4> @ verify. SQL failover status For current user ========================================== ======= Sid serial # failover_type failover_method failed_over ------ -------- --------------- ----------- 1071 249 none no current instance name and host name ================ ======================== instance_name host_name ---------------- ---------------------- gobo4a bo2dbp # Stop the cluster Database first instance, gobo4a Oracle @ bo2dbp: ~> Srvctl stop instance-D gobo4-I gobo4a # Check Result Oracle @ bo2dbp: ~>. /Crs_stat.sh | grep inst ora. gobo4.gobo4a. inst offline ora. gobo4.gobo4b. inst online on bo2dbs # Return to the client's original session, when the ORA-03114 fail_over @ gobo4>/select instance_name, host_name from V $ instance * error at line 1: ORA-03113: end-of-file on communication channel fail_over @ gobo4>/error: ORA-03114: not connected to Oracle error: ORA-03114: not connected to Oracle # Try to reestablish connection fail_over @ g Obo4> conn fail_over/fail @ gobo4 connected. fail_over @ gobo4> @ verify failover status for current user ======================== ================== Sid serial # failover_type failover_method failed_over ------ -------- ------------- 1062 94 none no current instance name and host name = ============================================================== instance_name host_name ---------------- --- ----------------- Gobo4b bo2dbs # Author: Robinson # blog: http://blog.csdn.net/robinson_0612 # from the preceding query, the current session has been connected to the second instance. Failover_type, failover_method, and failed_over have not changed. # because these parameters are mainly for TAF. 5. Summary A. Failover during client connection. The server and client are enabled by default without any configuration, that is, failover = on B. As long as the cluster environment exists (not a single node RAC), client connection requests will try to list the VIPs one by one until the connection is successful, if error C is returned and the client has been established, the server instance or node fails, causing the client to initiate a new connection request.

More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Configure the Oracle client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the Oracle architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle online redo log file)
Oracle Control File)
Oracle archiving logs
Oracle rollback and undo)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.