查看: 24492|回复: 17

[讨论] 请问关于Oracle 11G R2中的SCAN该如何理解?

[复制链接]
论坛徽章:
3
祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:19:072011新春纪念徽章
日期:2011-02-18 11:43:35
跳转到指定楼层
1#
发表于 2009-10-22 17:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问关于Oracle 11G R2中的SCAN该如何理解?
看了下面的解释更迷惑了。我在做Oracle 11G R2 RAC测试时,将SCAN指定为了一台实际存在的机器IP,结果造成Installer失败。不理解SCAN究竟是做什么用的。

请各位指教。

Understanding SCAN Addresses and Client Service Connections
Public network addresses are used to provide services to clients. If your clients are connecting to the Single Client Access Name addresses, then you may need to change public and virtual IP addresses as you add or remove nodes from the cluster, but you do not need to update clients with new cluster addresses.

SCANs function like a cluster alias. However, SCANs are resolved on any node in the cluster, so unlike a VIP address for a node, clients connecting to the SCAN no longer require updated VIP addresses as nodes are added to or removed from the cluster. Because the SCAN addresses resolve to the cluster, rather than to a node address in the cluster, nodes can be added to or removed from the cluster without affecting the SCAN address configuration.

The SCAN is a fully qualified name (host name+domain) that is configured to resolve to all the addresses allocated for the SCAN. The addresses resolve using Round Robin DNS either on the DNS server, or within the cluster in a GNS configuration. SCAN listeners can run on any node in the cluster. SCANs provide location independence for the databases, so that client configuration does not have to depend on which nodes run a particular database.

Oracle Database 11g release 2 (11.2) and later instances only register with SCAN listeners as remote listeners. Upgraded databases register with SCAN listeners as remote listeners, and also continue to register with all node listeners.

The Single Client Access Name (SCAN) should really be defined in the DNS or GNS and round-robin between one of 3 addresses, which are on the same subnet as the public and virtual IPs. In this article I've defined it as a single IP address in the "/etc/hosts" file, which is wrong and will cause the cluster verification to fail, but it allows me to complete the install.


The Single Client Access Name (SCAN) should really be defined in the DNS or GNS and round-robin between one of 3 addresses, which are on the same subnet as the public and virtual IPs. In this article I've defined it as a single IP address in the "/etc/hosts" file, which is wrong and will cause the cluster verification to fail, but it allows me to complete the install.
论坛徽章:
12
2008新春纪念徽章
日期:2008-02-13 12:43:03目光如炬
日期:2017-03-19 22:00:00优秀写手
日期:2014-07-05 06:00:13马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:112013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:202012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB十周年纪念徽章
日期:2011-11-01 16:21:152011新春纪念徽章
日期:2011-02-18 11:43:32
2#
发表于 2009-10-22 21:16 | 只看该作者
简单来说,就是简化了一些设定
这里有一个还不错的说明 : http://www.oracle.com/technology ... tering/pdf/scan.pdf

使用道具 举报

回复
论坛徽章:
25
生肖徽章2007版:鸡
日期:2008-01-02 17:35:53管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:58马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14
3#
发表于 2009-10-25 21:49 | 只看该作者
在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个主机vip的一个连接串,如果cluster增加了一个节点,那么对于每个连接数据库的客户端都需要修改这个tnsnames.ora。

引入了scan以后,就方便了客户端连接的一个接口,顾名思义 single client access name ,简单客户端连接名,这是一个唯一的名称,在整个公司网络内部唯一,并且在DNS中可以解析为三个ip地址,客户端连接的时候只需要知道这个名称,并连接即可, 每个SCAN VIP对应一个scan listener,cluster内部的service在每个scan listener上都有注册,scan listener接受客户端的请求,并foward到不同的Local listener中去,还是由local 的listener提供服务给客户端。

使用道具 举报

回复
招聘 : 系统架构师
论坛徽章:
372
双子座
日期:2015-08-18 12:18:21摩羯座
日期:2015-09-20 17:10:27秀才
日期:2015-09-21 09:46:16秀才
日期:2015-09-21 11:16:42秀才
日期:2015-10-08 17:57:58天枰座
日期:2015-10-28 18:28:29秀才
日期:2015-11-11 09:48:44秀才
日期:2015-11-11 10:07:14秀才
日期:2015-11-11 10:22:49秀才
日期:2015-09-11 10:43:06
4#
发表于 2009-10-27 17:52 | 只看该作者
good

使用道具 举报

回复
论坛徽章:
4
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44生肖徽章2007版:虎
日期:2009-03-01 12:38:04蛋疼蛋
日期:2011-08-09 08:26:22ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41
5#
发表于 2009-10-29 23:00 | 只看该作者
看了一些文档,还是对scan不是特别理解。scan是ip地址还是一个名字?如果是个名字,为什么还要配IP地址呢?
如果采用dns轮转方式,完全可以配置原来的vip到dns上,这样一样可以做负载均衡,也不用在客户端配置多个ip地址了呀?增加了node就改变dns就是了。
另外,scan需要每各node都有一个scan ip吗?很多文档都提到了3各scan ip,不知道是什么意思。

使用道具 举报

回复
论坛徽章:
25
生肖徽章2007版:鸡
日期:2008-01-02 17:35:53管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-02-13 15:10:58马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14
6#
发表于 2009-10-30 14:04 | 只看该作者
原帖由 youngcow 于 2009-10-29 23:00 发表
看了一些文档,还是对scan不是特别理解。scan是ip地址还是一个名字?如果是个名字,为什么还要配IP地址呢?
如果采用dns轮转方式,完全可以配置原来的vip到dns上,这样一样可以做负载均衡,也不用在客户端配置多个ip地址了呀?增加了node就改变dns就是了。
另外,scan需要每各node都有一个scan ip吗?很多文档都提到了3各scan ip,不知道是什么意思。



scan只是一个名字,这个名字在DNS上解析成三个IP地址(VIP也是一个名字,也要配置一个ip地址阿)

无论cluster有多大(两个节点或者20个节点),都只有三个scan vip,在随机的节点上启动(如果是两个节点,可能三个vip在一个节点,也可能是1+2)

scan主要是简化客户端连接,你如果有20个节点,客户端连接的时候,是不是需要配置20个vip,如果用scan,只需要一个scan name就行了,剩下的事情,scan帮你做了。

使用道具 举报

回复
论坛徽章:
2
生肖徽章2007版:鸡
日期:2008-01-02 17:35:532010新春纪念徽章
日期:2010-01-04 08:33:08
7#
发表于 2009-10-30 20:26 | 只看该作者
对于这个比较迷惑.

使用道具 举报

回复
论坛徽章:
4
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44生肖徽章2007版:虎
日期:2009-03-01 12:38:04蛋疼蛋
日期:2011-08-09 08:26:22ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41
8#
发表于 2009-10-31 12:10 | 只看该作者
原帖由 ricky_zhu 于 2009-10-30 14:04 发表



scan只是一个名字,这个名字在DNS上解析成三个IP地址(VIP也是一个名字,也要配置一个ip地址阿)

无论cluster有多大(两个节点或者20个节点),都只有三个scan vip,在随机的节点上启动(如果是两个节点,可能三个vip在一个节点,也可能是1+2)

scan主要是简化客户端连接,你如果有20个节点,客户端连接的时候,是不是需要配置20个vip,如果用scan,只需要一个scan name就行了,剩下的事情,scan帮你做了。


两个问题:
1、现在rac安装的时候外网IP需要几个?比如4个节点,每个节点一个固定ip,然后每个节点一个vip,还要3个scan vip?(我测试安装的时候只给了一个scan vip也装上去了)
2、如果我把原来的vip也做在dns上,然后20个节点用dns做load balance是不是也能解决客户端配置20个vip的问题呢?

使用道具 举报

回复
论坛徽章:
2
灰彻蛋
日期:2012-04-06 18:05:252013年新春福章
日期:2013-02-25 14:51:24
9#
发表于 2010-3-16 13:51 | 只看该作者
请问有没有高手在虚拟机上配置成功过,我也遇到了这个问题

【INS-40922】Invalid SCAN Name - unresolvable to IP address.

使用道具 举报

回复
论坛徽章:
0
10#
发表于 2010-7-1 10:20 | 只看该作者
Scan 对应的3个 IP必须是 新的吗? 可以和RAC上面对应的 两个Virtual IPs 重复吗? 主要现在是在公司搭建环境,绑定到DNS非常麻烦 还得专门找 IT部门人员,能否有其它方法绕过此步骤? 对应的下面那个 GNS 也没有搞太懂

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表