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 is going to explain whats SCAN and how it works.
SCOPE
Intended audience will be DBAs who is installing/upgrading to 11gR2 Grid Infrastructure or support analyst who is supporting stated product.
DETAILS
SCAN Concepts
- Single client access name (SCAN) is the virtual hostname to 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 enterprise. The default value for the SCAN is based on the local node name. SCAN name must be at least one character long and no more than 15 characters in length, must be alphanumeric - cannot begin with a numeral and may contain hyphens (-). If you require a SCAN that is longer than 15 characters, then select an Advanced installation.
- For installation to succeed, the SCAN must resolve to at least one address.
- SCAN VIP addresses must be on the same subnet as virtual IP addresses and public IP addresses.
- Oracle strongly recommends that you do not 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 will receive Cluster Verification Utility failure at end of installation (see Note: 887471.1 for more details)
- For high availability and scalability, Oracle recommends that you 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 to add or remove nodes from the cluster without needing to reconfigure clients. It also adds location independence for the databases, so that client configuration does not have to depend on which nodes are running a particular database.
- Clients can continue to access the cluster in the same way as with previous releases, but Oracle recommends that clients accessing the cluster use the SCAN. Clients using the SCAN can also access the cluster using EZCONNECT.
- Grid Infrastructure will start local listener LISTENER on all nodes to listen on local VIP, and SCAN listener LISTENER_SCAN1 (up to three cluster wide) to listen on SCAN VIP(s); 11gR2 database by default will set local_listener to local LISTENER, and remote_listener to SCAN listener.
- SCAN listener will be running off GRID_HOME, and by default, in 11gR2 local listener will 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 are prompted to confirm the default Single Client Access Name (SCAN), which is used to connect to databases within the cluster irrespective of which nodes they are running on. If you change the SCAN from the default, then the name that you use must be globally unique throughout your enterprise.
If the SCAN name resolves to one IP address, root script (root.sh or rootupgrade.sh) will create the number of SCAN VIP resources(ora.scan1.vip) and corresponding SCAN listener resource(ora.LISTENER_SCAN1.lsnr) depend on how many IP address the SCAN name resolves to, i.e.if the SCAN name resolves to two IP addresses, it will create two SCAN VIP resources and two corresponding SCAN listener resource.
SCAN VIP and the corresponding SCAN listener works like a pair, when SCAN VIP fails over to other node, the corresponding SCAN listener will also be failed over to the same node.
When SCAN VIP fails over happens, it will always select a node with least running SCAN VIP, i.e., if SCAN VIP runs on node1, node2 and node3 of a 4-node cluster, if node3 goes down, the SCAN VIP and corresponding SCAN listener will be failed over to node4 as the other two nodes already have 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 local listeners for each node. SCAN listeners are not replacements for the node listeners.
A new set of cluster processes called scan listeners will run on three nodes in a cluster (or all nodes if there are less than 3). If you have more than three nodes, regardless of the number of nodes you have, there will be 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 are automatically restarted on a new node.
How does SCAN work ?
The following is the explanation given in Appendex D "Oracle Grid Infrastructure for a Cluster Installation Concepts" of the 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 client's behalf. Because all services on the cluster are registered with the SCAN listener, the SCAN listener replies with the address of the 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 on the node where service is offered.All of these actions take place transparently to the client without any explicit configuration required in the client."
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 '/etc/hosts' to resolve SCAN?
Oracle strongly recommends that you do not 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 will receive Cluster Verification Utility failure at end of installation (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 way as with previous releases. Vips are still used internally, and can still be used for connections. But Oracle strongly recommends that 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 an elementary part of 11gR2 Grid Infrastructure, it's not supported to remove SCAN.
Is it recommended to 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
Sample TNS Entry without SCAN
REFERENCES
NOTE:1053147.1 - 11gR2 Clusterware and Grid Home - What You 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 Port after Installation
NOTE:975457.1 - How to Troubleshoot Connectivity Issue with 11gR2 SCAN Name
Grid Infrastructure Single Client Access Name (SCAN) Explained (文档 ID 887522.1)的更多相关文章
-
Oracle client客户端简易安装网上文档一
Oracle client客户端简易安装网上文档一-------------------------------------------------------------------------一. ...
-
转://诊断 Grid Infrastructure 启动问题 (文档 ID 1623340.1) .
文档内容 用途 适用范围 详细信息 启动顺序: 集群状态 问题 1: OHASD 无法启动 问题 2: OHASD Agents 未启动 问题 3: OCSSD.BI ...
-
诊断 Grid Infrastructure 启动问题 (文档 ID 1623340.1)
适用于: Oracle Database - Enterprise Edition - 版本 11.2.0.1 和更高版本本文档所含信息适用于所有平台 用途 本文提供了诊断 11GR2 和 12C G ...
-
Grid Infrastructure 启动的五大问题 (文档 ID 1526147.1)
适用于: Oracle Database - Enterprise Edition - 版本 11.2.0.1 和更高版本本文档所含信息适用于所有平台 用途 本文档的目的是总结可能阻止 Grid In ...
-
Oracle Grid Infrastructure: Understanding Split-Brain Node Eviction (文档 ID 1546004.1)
In this Document Purpose Scope Details What does "split brain" mean? Why is this ...
-
介绍一款jquery ui组件gijgo(含tree树状结构、grid表格),特点:简易、文档全清晰易懂、示例代码
http://gijgo.com gijgo组件 特点:简易.文档全-虽然是英文的但是清晰易懂可读性强.含示例代码(后端直接用原生.Net C# MVC的哦!非常合.Net开发胃口),网站网速快, ...
-
11gR2 集群(CRS/GRID)新功能—— SCAN(Single Client Access Name)
https://blogs.oracle.com/database4cn/11gr2-crsgrid-scansingle-client-access-name
-
为11.2.0.2 Grid Infrastructure添加节点
转自:http://www.askmaclean.com/archives/add-node-to-11-2-0-2-grid-infrastructure.html 在之前的文章中我介绍了为10g ...
-
CentOS 7.2安装11g Grid Infrastructure
Preface Oracle claimed that 11g RAC is supported on Redhat Linux 7 and above version,but the ...
随机推荐
-
【Win10 UWP】微信SDK基本使用方法和基本原理
上回讲到,作为一个长期散播温暖,散播希望的小清新无公害WP开发者,继QQ SDK之后,又把UWP微信SDK这茬了结了,仅供学习交流. 1.安装微信SDK for UWP 微信官方此前明确说明短时间内暂 ...
-
webpack脚手架搭建(简单版)
运行命令 安装依赖:npm install 运行项目:npm start 大致流程 npm init:新建 package.json 将需要的依赖模块加入 dependencies(生产环境) 和 d ...
-
UVALive 3977
直接搜索,简单题: #include<cstdio> #include<cstring> #include<cmath> #include<algorithm ...
-
mysql 查询优化案例
mysql> explain SELECT c.`sn` clientSn,asm.`clientManagerSn`,pry.`productSn`,1 TYPE,pr.`capitalBal ...
-
(大数据工程师学习路径)第四步 SQL基础课程----SQL介绍及mysql的安装
一.数据库和SQL介绍 数据库(Database)是按照数据结构来组织.存储和管理数据的仓库,它的产生距今已有六十多年.随着信息技术和市场的发展,数据库变得无处不在:它在电子商务.银行系统等众多领域都 ...
-
python函数,模块及eclipse使用
一.eclipse的使用 1.作用 (1)最好用的IDE (2)可调式debug (3)查看可执行过程 (4)可查看源代码 2.安装eclipse及配置 目录安装Pythonpython for ec ...
-
第一册:lesson 103.
原文:The French text. How was the exam, Richard? Not too bad. I think I passed in English and Mathemat ...
-
【mysql】mysql尾部空格
mysql 字段为varchar类型的在查询时候胡忽略尾部空格. 先看表结构 插入一条数据包含空格 在查询是可以查到的 所有在插入数据的时候要对插入字段的数据处理下,php可以用函数trim()去掉两 ...
-
【经验总结】- IDEA无法显示Project目录怎么办
1. 关闭IDEA 2.然后删除项目文件夹下的.idea文件夹 3.重新用IDEA工具打开项目 4.再次点击如下图即可搞定
-
HDU 2154:跳舞毯
跳舞毯 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...