SCAN(Single Client acccess Name)

2010年05月5号  |  11:06分类: RAC维护 , 管理维护   |   编辑   |  标签: 11ggridRACscan  
本文出自 “ inthirties(男 人三十) ”博客,转载请务必注明作者和保留出处。



11gR1还是和10g没有太多的差别,在RAC的安装上,还是沿用以前的RAC的OUI,倒了11gR2的变化就大了,RAC不再OUI里了。取 而代之的是Grid Infrastrutcture,可谓确实是质上的改变呀。一下确实没有习惯过来,折腾了几天,以为类似10g一样直接上手安装就可以了。实际上是碰了一 头的灰呀。看来还是要从基础开始了。看看installation和conception。了解到了其中的一部分。

先谈谈scan吧
在玩10g的RAC的时候,有一个大家抱怨很多的一点,就是vip,在我们的客户端和服务端,有很多用到vip的地方。为了实现服务器和客户端的lb和 taf,我们要在tnsname.ora里都需要把每个节点的vip都配置在里面,在服务器上的local_listener和 remote_listener也是如此。每个客户端都是如此。更麻烦的是,如果添加了一个node的话,还要通知客户们,一个一个的在把这些地方找出 来,把新的节点的vip再添加进去。有时候,确实不麻烦,但是和客户沟通起来叫苦喋喋呀。

 

在11gR2里终于,需要这样了,tnsnames.ora只需要配置一个SCAN-VIP, 本地监听和远程监听也要配置SCAN-VIP

# tnsnames.ora Network Configuration File: /u01/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
RACONE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = scan-vip1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = 11gdb)
)
)

 

 

SQL> show parameter lis
NAME TYPE VALUE
———————————— ———– ——————————
listener_networks string
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=11g
-vip)(PORT=1521))))
recovery_parallelism integer 0
remote_listener string scan-vip1:1521

 

 

这样,再需要修改添加新的node的时候,我们就不需要修改这个地方了。所以在这一点上11gR2是人性化考虑的一个进步。

SCAN的全面是Single Client acccess Name(单客户端访问名称), 对应的是一个域名,解析可以通过DNS或者GNS(Grid Naming Service)来完成。scan在RAC安装过程中是必须项目,默认的scan名字是集群名字,由于没有解析IP地址是ping不通。如果要装11g Grid, 先配置DNS,是scan-vip能够被解析出来。

 

 

以下是Oracle文档里的描述
The Single Client Access Name (SCAN) is a fully qualified name (hostname+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.

Oracle Database 11g release 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.

SCANs run on the cluster, not on a cluster node. SCANs provide location independence for the databases, so that client configuration does not have to depend on which nodes are running a particular database. For example, if you configure policy managed server pools in a cluster, then the SCAN allows connections to databases in these server pools regardless of which nodes are allocated to the server pool.

SCANs function like a node virtual IP (VIP) address. However, SCANs are resolved to SCAN VIPs that run on any node in the cluster, so unlike a virtual IP address for a node, clients connecting to the SCAN no longer require updated virtual IP 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.

During Oracle grid infrastructure installation, SCAN listeners are created for as many IP addresses as there are addresses assigned to resolve to the SCAN. Oracle recommends that the SCAN resolves to three addresses, to provide high availability and scalability. If the SCAN resolves to three addresses, then there are three SCAN listeners created.

Oracle RAC provides failover with the node VIP addresses by configuring multiple listeners on multiple nodes to manage client connection requests for the same database service. If a node fails, then the service connecting to the VIP is relocated transparently to a surviving node, enabling fast notification of the failure to the clients connecting through the VIP. If the application and client are configured with transparent application failover options, then the client is reconnected to the surviving node. Oracle Clusterware routes client application requests from the SCAN to the VIP on the least loaded instance providing the service.

Clients configured to use IP addresses for Oracle Database releases prior to Oracle Database 11g release 2 can continue to use their existing connection addresses; using SCANs is not required. When you upgrade to Oracle Clusterware 11g release 2 (11.2), the SCAN becomes available, and you should use the SCAN for connections to Oracle Database 11g release 2 or later databases. When an earlier version of Oracle Database is upgraded, it is registered with the SCAN, and clients can start using the SCAN to connect to that database.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

inthirties

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值