ORACLE: the client automatically selects valid connection addresses, automatic session reconnection, and Server Load balancer

Source: Internet
Author: User

 

This is a feature of the Oracle client, is for the ApplicationProgramProvides driver-level ha functions. You can directly configure it in tnsnames. ora, which is very convenient!

1. The client automatically selects a valid connection address

When there are multiple addresses, We can configure the Oracle client to try each address one by one until the available address is found!

(

(Source_route = on) # instructs the Oracle client to try to connect one by one until available addresses are found. Otherwise, only the first address is used.

(Address = (Protocol = TCP) (host = IP-1) (Port = 1521 ))

(Address = (Protocol = TCP) (host = IP-2) (Port = 1521 ))

....

)

 

Ii. Automatic reconnection of client sessions

When there are multiple addresses, We can configure the Oracle client to try each address one by one until the available address is found!

(

(Failover =On)# Indicates that Oracle customers can perform session reconnection. This function is enabled by default, but the reconnection mode is type = none, which means that the Failover function is not enabled. You must set the CONNECT_DATA parameter !!

(Address = (Protocol = TCP) (host = IP-1) (Port = 1521 ))

(Address = (Protocol = TCP) (host = IP-2) (Port = 1521 ))

....

(CONNECT_DATA =

(SERVICE_NAME = Service)

(Failover_mode =

(Type = {None| Session | select}) # function level of session reconnection.

(Method = {Basic| Preconnect}) # is the connection established during failover or in advance?

(Retries = 5) # Number of Retries

(Delay = 1) # retry Delay

)

)

 

Three Oracle clients support connection to Server Load balancer at the same time

(

(Load_balance = on) # instruct the Oracle client to perform Load Balancing for connection sessions

(Address = (Protocol = TCP) (host = IP-1) (Port = 1521 ))

(Address = (Protocol = TCP) (host = IP-2) (Port = 1521 ))

....

)

 

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.