Oracle SCAN-IP

SCAN(Single Client Access Name)是Oracle从11g R2开始引入的,客户端可以通过SCAN特性负载均衡地连接到RAC群集。SCAN是一个域名,可以解析至少1个IP,至多3个IP,SCAN IP需要与public IP在一个子网内。SCAN域名可以通过DNS或GNS的方式来解析,GNS是11GR2引入的,可以通过DHCP服务为节点和SCAN分配VIP和SCAN IP,当然也可以采用HOST解析的方式来配置SCAN,这种方式就只能定义一个SCAN IP。

在引入SCAN之前,客户端连接RAC群集需要配置所有节点的监听信息以及FAILOVER配置,如下列配置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
ORCL = (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.139.161)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.139.162)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
      (FAILOVER_MODE =
         (TYPE = select)
         (METHOD = basic)
         (RETRIES = 180)
         (DELAY = 5)
      )
    )

在配置SCAN后,客户端仅需要连接SCAN LISTENER,由SCAN来完成FAILOVER,负载均衡等内容

1
2
3
4
5
6
7
8
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.139.163)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus