The purpose and rationale for the scan IP in Oracle 11G R2 RAC "Go"

Source: Internet
Author: User

Oracle 11G R2 RAC adds the scan IP feature, Before 11.2, the client link to the database with the VIP, if your cluster has 4 nodes, then the clients Tnsnames.ora in the corresponding has four host VIP of a connection string, if the cluster added a node, then for each connection database client needs to modify this Tnsnames.ora.

After the introduction of scan, it is convenient for the client to connect an interface, as the name implies, a single client access name, a simple connection name, this is a unique name, within the entire corporate network is unique, and in DNS can be resolved to three IP addresses, Client connection only need to know this name, and connect, each scan VIP corresponding to a scan listener,cluster internal service on each scan listener have registered, scan listener accept the client's request, and foward to different local listener, or by the local listener to provide services to the client.


Scan is just a name that resolves to three IP addresses on DNS (VIP is also a name, also configure an IP address)

Regardless of the size of the cluster (two nodes or 20 nodes), there are only three scan VIP, start on a random node (if two nodes, maybe three VIP is in one node, it may be 1+2)

Scan is mainly to simplify the client connection, if you have 20 nodes, when the client connection, is not required to configure 20 VIP, if using scan, only need a scan name on the line, the rest of the matter, scan to help you do.



As for why it is necessary to register three in DNS, mainly to maximize usability.
When the number of nodes is greater than 3 o'clock, there will be only 3 scan listener, which means that there are no scan listener on the nodes.
If you use the/etc/hosts file to parse the scan IP, because you cannot do rotation load balancing, so this time scan IP can only have one.



For example:

How Oracle clients connect to Oracle 11GR2 database server with DNS SCAN IP

[Email protected] ~]$ srvctl config scan
SCAN name:racnode-cluster-scan.racnode.com, Network:1/192.168.3.0/255.255.255.0/eth0
SCAN VIP name:scan1, IP:/racnode-cluster-scan.racnode.com/192.168.3.231
SCAN VIP name:scan2, IP:/racnode-cluster-scan.racnode.com/192.168.3.233
SCAN VIP name:scan3, IP:/racnode-cluster-scan.racnode.com/192.168.3.232



Client Tnsnames.ora Configuration

RACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = racnode-cluster-scan.racnode.com) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = racdb) {
)  )

Tnsping Test

The client network configuration points to the DNS server address 192.168.3.32

C:\Documents and Settings\administrator>tnsping racdb

TNS Ping Utility for 32-bit windows:version 11.1.0.7.0-production on 20月-July-2010 18:53:50

Copyright (c) 1997, the Oracle. All rights reserved.

Used parameter file:
D:\app\Administrator\product\11.1.0\db_1\network\admin\sqlnet.ora

Used the TNSNames adapter to resolve aliases
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = racnode-cluster-scan.racnode.com) (PORT = 1521)) (C Onnect_data = (SERVER = dedicated) (service_name = racdb)))
OK (80 milliseconds)

Client connections

C:\Documents and Settings\administrator>sqlplussystem/[email protected]

Sql*plus:release 11.1.0.7.0-production on Tuesday July 20 18:46:15 2010

Copyright (c) 1982, the Oracle. All rights reserved.
Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, Real application Clusters, Automatic Storage Management
Olap
Data Mining and Real application testing options

Sql> select instance_name from V$instance;

Instance_name
----------------
Racdb2

Sql> exit

The difference between scan and VIP

This is a good way to look, but if you have hundreds or thousands of clients on a large local area network, and they are scattered everywhere, the simple thing is not easy. Scan IP is for this problem, it is to establish a layer of virtual access between the server side and the client, the client's tnsnames only the scan IP listening information, that is, the client directly access the scan IP without direct access to the real server IP. And the scan IP is floating, it and the node itself is the VIP of the difference is that the VIP listener is bound with instance, set the role of VIP is, when the node down, the VIP will automatically jump to the normal node, but the VIP corresponding to the listener will not jump, originally, If you do not use the VIP, the original connection to the outage node of the program will not be the server response, and then wait for the connection time-out, the client then retry, retry a certain number of times still failed to go to the other nodes, the process is quite time-consuming. If using the VIP, the node after the VIP jump to the normal node, the original access to the outage node of the program request sent to the VIP jump node, the normal node received a connection request directly to the endpoint return error message, tell it that the original access to the node has been broken down, This is where the client will use other addresses in TNS. This time is much smaller than the time that does not apply to VIPs.

and the scan IP mechanism is the IP with the corresponding listener floating together, if a node down, then the original stay in the node scan IP and listener will jump to other available nodes. Therefore, for the client, there is no need to change the original configuration information, only need to access the scan IP to the normal use of the database, as for the scan IP with the real node of the corresponding relationship, it is the scan IP layer to be concerned about and implementation

Turn from

The purpose and rationale of the scan IP in Oracle 11G R2 RAC-aaron8219-chinaunix Blog
Http://blog.chinaunix.net/uid-24612962-id-3847628.html

Understanding of Scan IP-CSDN Blog
http://blog.csdn.net/jx_jy/article/details/11889901

Oracle RAC VIP and Scan Ip-virson Ma-Blog Park
Http://www.cnblogs.com/mawanglin2008/articles/3472395.html

The purpose and rationale for the scan IP in Oracle 11G R2 RAC "Go"

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.