SCAN(Single Client acccess Name)

网友投稿 225 2022-11-05


SCAN(Single Client acccess Name)

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.

如果没有那句“三十而立”,三十岁的男人正可以轻轻松松


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:重做(Redo)之redo的内容
下一篇:大乐透开机号和试机号今天查询API(大乐透开机号和试机号今天查询家彩网)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~