Oracle 12c Application Connection VIP rotation load balancing?

Source: Internet
Author: User


At present, many production databases are two node RAC, application connected database will usually connect scan IP or VIP, here do a small experiment, if we use VIP connection,

How to configure our clients, load balancing is a strict rotation mechanism, only through their own testing to get ready to answer.


    1. Tnsnames.ora Configuration

<rac01:orcl1:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin> $less Tnsnames.ora

# Tnsnames.ora Network Configuration File:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.


ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = Rac-scan) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = ORCL)

)

)


VIP =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.203) (PORT = 1521))

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.204) (PORT = 1521))

(load_balance = yes)

(Connect_data =

(SERVER = dedicated)

(service_name = ORCL)

)

)


2. The test script is as follows

<rac01:orcl1:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin>$

<rac01:orcl1:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin> $less load_balance.sh

#!/bin/bash

For i in {1..100}

Do

Echo $i

Sqlplus-s System/[email protected] <<eof

Select instance_name from v\ $instance;

Select COUNT (*) from T1;

Eof

Sleep 1

Done

Exit 0


3. Start the test and observe

<rac01:orcl1:/u01/app/oracle/product/12.1.0/dbhome_1/network/admin> $sh load_balance.sh

1


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


2


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


3


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


4


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


5


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


6


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


7


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


8


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


9


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


10


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


11


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


12


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


13


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


14


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


15


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


16


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


17


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


18


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


19


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


20


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


21st


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


22


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


23


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


24


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


25


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


26


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


27


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


28


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


29


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


30


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


31


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


32


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


33


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


34


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


35


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


36


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


37


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


38


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


39


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


40


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


41


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


42


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


43


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


44


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


45


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


46


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


47


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


48


Instance_name

----------------

Orcl2



COUNT (*)

----------

2910624


49


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


50


Instance_n

.... Omitted...............


COUNT (*)

----------

2910624


100


Instance_name

----------------

Orcl1



COUNT (*)

----------

2910624


Oracle 12c Application Connection VIP rotation load balancing?

Related Article

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.