Oracle RAC Scan IP usage principles

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

Oracle RAC Scan IP usage principles

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.