Connection Management in the OracleRAC Environment

Source: Internet
Author: User
This article details connection management in the OracleRAC environment, and introduces what is ConnectTimeLoadBalancing and RuntimeConnectionLoadBala respectively.

This article details Connection management in the Oracle RAC environment, and introduces what is Connect Time Load Balancing and Runtime Connection Load Bala respectively.

This article details Connection management in the Oracle RAC environment, and introduces what are Connect Time Load Balancing, Runtime Connection Load Balancing, Connect Time Connection Failover, and Runtime Connection Failover, TAF, ONS, FCF, FAN, LBA, and many other knowledge points. This article focuses on connection management in the Oracle RAC 11gR2 environment, but it also compares and describes Oracle RAC 10gR2/9iR2 to reflect the differences in connection management between them.

The so-called "connection management" is mainly reflected in Load Balancing and Failover. The Load Balancing and Failover in Oracle RAC 11gR2 are based on whether an existing connection exists in advance (such as a connection in the connection pool) there are four types: Connect Time Load Balancing, Runtime Connection Load Balancing, Connect Time Connection Failover, and Runtime Connection Failover. Any type with the prefix of "Runtime, the connection already exists. For example, the connection pool is used.

1. First introduce Connect Time Connection Failover

Connect Time Connection Failover refers to the Failover when you directly Connect to the Oracle database instead of getting an existing Connection from the Connection pool. Before Oracle RAC 11gR2, Connect Time Connection Failover is very easy to implement. You only need to specify multiple VIPs in the relevant tnsnames. ora and specify FAILOVER = ON. As follows:

(DESCRIPTION = (FAILOVER = ON) (ADDRESS_LIST = (LOAD_BALANCE = OFF) (ADDRESS = (PROTOCOL = TCP) (HOST = RAC1-vip) (PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP) (HOST = RAC2-vip) (PORT = 1521) (ADDRESS = (PROTOCOL = TCP) (HOST = RAC3-vip) (PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP) (HOST = RAC4-vip) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = RAC10g )))

Here the client process will first try to connect to the RAC1-vip, if not, will try the RAC2-vip, and then can not connect, will continue to try, until all the vip addresses that appear in ADDRESS_LIST are tried in sequence. The Failover of this client when connecting to the Oracle database is not only applicable to the RAC environment, but also to the Data Guard environment. As follows:

DESCRIPTION = (FAILOVER = ON) (ADDRESS_LIST = (LOAD_BALANCE = OFF) (ADDRESS = (PROTOCOL = TCP) (HOST = primary-ip) (PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP) (HOST = standby-ip) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = service10g )))

Oracle RAC 11gR2 introduces SCAN (Single Client Access Name), and the Client connects to the entire RAC environment through SCAN by default. The following figure shows the architecture of SCAN:

As shown in, if you use DNS or GNS (Grid Naming Service), you can have up to three SCAN VIPs and three SCAN Listener. If you do not use DNS or GNS, instead, if you select to use the hosts file, there will be only one scan vip and one SCAN Listener.

Assume that the configuration is as follows in tnsnames. ora:

(DESCRIPTION = (FAILOVER = ON) (ADDRESS = (PROTOCOL = TCP) (HOST = MySCAN) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RAC11g )))

Strictly speaking, the above FAILOVER = ON makes sense only when there are more than one scan vip in the RAC environment -- it indicates that when the client connects to the scan vip, if one of the SCAN VIPs cannot be connected, another scan vip will be attempted immediately.

When the hosts file is used to specify the scan vip, that is, if there is only one scan vip in the entire RAC environment, Failover actually exists, in this case, Failover is slower. When the node where the scan vip is located goes down, scan vip will Failover along with the SCAN Listener to other nodes, but this Failover takes time, the client must wait for the Failover process to complete before re-connecting to RAC.

Ii. Next we will introduce the Runtime Connection Failover

Runtime Connection Failover refers to the Failover when the Connection already exists. This existing connection may be a connection in use in the connection pool, or a connection to the Oracle database directly through the OCI client (such as sqlplus) instead of the connection pool.

This type of Runtime Connection Failover refers to the abnormal situation on the Oracle database end when the Connection already exists (for example, the Service is down, the Instance is crashed, and the Session is broken) as a result, the existing connection is interrupted.

There are two methods to implement the Runtime Connection Failover: TAF (Transparent Application Failover) and FCF (Fast Connection Failover ).

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.