Grid Infrastructure single Client Access Name (SCAN) explained (document ID 887522.1)

Source: Internet
Author: User
Tags new set

Applies To:

Oracle database-enterprise edition-version 11.2.0.1 and later
Exalogic Elastic Cloud x4-2 half Rack
Information in this document applies to any platform.

PURPOSE

11gR2 Grid Infrastructure (CRS) introduced single client Access Name (SCAN) to simplify Client access to database services , this article was going to explain whats SCAN and how it works.

SCOPE

Intended audience'll be DBAs who's installing/upgrading to 11gR2 Grid Infrastructure or support analyst who's is SupportI Ng stated product.

DETAILS

SCAN Concepts
  • Single Client access name (SCAN) is the virtual hostname-provide for all clients connecting to the cluster (as opposed To the VIP hostnames in 10g and 11gR1).
  • SCAN is a domain name registered to at least one and up to three IP addresses, either in the Domain Name Service (DNS) or The Grid naming Service (GNS).
  • By default, the name used as the "SCAN is also" the name of the cluster and must be globally unique throughout your ENTERPRI Se. The default value for the SCAN was based on the local node name. SCAN name must is at least one character long and no more than characters in length, must be Alphanumeric-cannot Begi n with a numeral and may contain hyphens (-). If you require a SCAN, the is longer than characters and then select an advanced installation.
  • For installation to succeed, the SCAN must resolve to at least one address.
  • SCAN VIP addresses must is on the same subnet as virtual IP addresses and public IP addresses.
  • Oracle strongly recommends that's don't configure SCAN VIP addresses in the Hosts file. But if you use the "Hosts file to resolve SCAN" name, you can have only one SCAN IP address.
  • If Hosts file is used to resolve SCAN hostname, you'll receive Cluster verification Utility failure at end of Installati On (see note:887471.1 for more details)
  • For high availability and scalability, Oracle recommends, which configure the SCAN to use DNS Round Robin resolution to Three addresses.
  • Because the scan is associated with the cluster as a whole, rather than to a particular node, the scan makes it possible t o Add or remove nodes from the cluster without needing to reconfigure clients. It also adds location independence-the databases, so-client configuration does not has to depend on which nodes Is running a particular database.
  • Clients can continue to access the cluster in the same is as with previous releases, but Oracle recommends that clients a Ccessing the cluster use the SCAN. Clients using the SCAN can also access the cluster using Ezconnect.
  • Grid Infrastructure'll start local listener listener on all nodes to listen on local VIP, and SCAN listener Listener_sca N1 (up to three cluster wide) to listen on SCAN VIP (s); 11gR2 database By default would set Local_listener to the local listener, and Remote_listener to SCAN listener.
  • SCAN listener is running off Grid_home, and by default, in 11gR2 local listener would be running off Grid_home as well .

Common Questions regarding SCAN

The following is a list of commonly asked questions regarding SCAN:

How can we configure the scan and Scan listener?

During Typical installation, you were prompted to confirm the default a single Client Access Name (SCAN), which was used to co  Nnect to databases within the cluster irrespective for which nodes they is running on. If the SCAN is from the default and then the name is globally unique throughout your enterprise must be.

If the scan name resolves to one IP address, root script (root.sh or rootupgrade.sh) would create the number of scan VIP re Sources (ORA.SCAN1.VIP) and corresponding SCAN listener resource (ora. Listener_scan1.lsnr) depend on what many IP address the scan name resolves to, i.e.if the scan name resolves to IP addr Esses, it'll create both scan VIP resources and corresponding SCAN listener resource.

Scan VIP and the corresponding scan listener works like a pair, when scan VIP fails through to other node, the corresponding SCAN listener'll also be failed on to the same node.

When scan VIP fails over happens, it would always select a node with least running SCAN VIP, i.e., if scan VIP runs on node 1, Node2 and node3 of a 4-node cluster, if node3 goes down, the scan VIP and corresponding scan listener would be failed ov Er to node4 as the other nodes already has one SCAN VIP running on each node.

Also we can use ' srvctl ' to add/modify the scan resource and the listeners. Please refer to ' Real application Clusters Admin and Deployment Guide ' or Note 1053147.1 for more information.

Do we still need to configure local listeners on each node?

Yes, you would need to configure independent The local listeners for each node. SCAN listeners is not replacements for the node listeners.

A new set of cluster processes called scan listeners would run on three nodes in a cluster (or all nodes if there is less  than 3).   If you had more than three nodes, regardless of the number of nodes you had, there would be is at most three scan listeners.  The database registers with the SCAN listener through the remote listener parameter in the Init.ora/spfile. If any of these clustered processes fail, they is automatically restarted on a new node.

How is does SCAN work?




The following is the explanation given in Appendex D "Oracle Grid Infrastructure for a Cluster installation concepts" of t He Oracle Grid Infrastructure Installation Guide:

When a client submits a request, the scan listener listening on a scan IP address and the scan port is contracted on a CL Ient ' s behalf. Because all services on the cluster is registered with the scan listener, the scan listener replies with the address of T He local listener on the least-loaded node (each scan listener keeps updated cluster load statistics) where the service is Currently being offered. Finally, the client establishes connection to the service through the listener in the node where service is offered. All of these actions take place transparently to the client without any explicit configuration required in the client. "

$ SRVCTL STATUS Scan_listener
SCAN Listener listener_scan1 is enabled
SCAN Listener Listener_scan1 is running on node TEST1
SCAN Listener listener_scan2 is enabled
SCAN Listener listener_scan2 is running on node TEST2
SCAN Listener LISTENER_SCAN3 is enabled
SCAN Listener Listener_scan3 is running on node TEST3

Instead of DNS or GNS, Can we use the '/etc/hosts ' to resolve SCAN?

Oracle strongly recommends that's don't configure SCAN VIP addresses in the Hosts file. But if you use the "Hosts file to resolve SCAN" name, you can have only one SCAN IP address.

If Hosts file is used to resolve SCAN hostname, you'll receive Cluster verification Utility failure at end of Installati On (see NOTE 887471.1 for more details)

Can we use the previous method (Using VIP) for client connection?

Clients can continue to access the cluster in the same, as with previous releases. Vips is still used internally, and can still is used for connections. But Oracle strongly recommends this clients accessing the cluster use the SCAN. Clients using the SCAN can also access the cluster using Ezconnect.

Is it mandatory to use SCAN?

It's highly recommended to use SCAN unless there's strong business reason preventing it from being used.

Is it supported to remove SCAN?

SCAN is a elementary part of 11gR2 Grid Infrastructure, it's not supported to remove SCAN.

Is it recommended-use cost feature?

As a best practice, Oracle recommends using the cost feature to restrict instance registration with SCAN listeners as part  of your standard listener configuration. Refer to note 1340831.1 for more details.

Demo



Sample TNS entry for SCAN

TEST. oracle.com = (description= (address= (PROTOCOL=TCP) (host=scan-test. oracle.com) (port=1521)) (Connect_data= (service_name=11gr2test. oracle.com)))



Sample TNS Entry without SCAN

TEST. oracle.com = (description= (address_list= (address= (protocol=tcp) (host=test1-vip.oracle.com), PORT=1521) (ADDRESS= ( PROTOCOL=TCP) (host=test2-vip.oracle.com) (port=1521))) (Connect_data= (service_name=11gr2test. oracle.com)) REFERENCES

Note:1053147.1-11gr2 Clusterware and Grid home-what need to Know
note:887471.1-prvf-4664 Prvf-4657:found Inconsistent name resolution entries for SCAN name
Note:972500.1-how to Modify scan Setting or scan Listener ports after installation
Note:975457.1-how to troubleshoot Connectivity Issue with 11gR2 SCAN Name

Grid Infrastructure single Client Access Name (SCAN) explained (document ID 887522.1)

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.