ITPub博客

首页 > 数据库 > Oracle > oracle-rac--srvctl add scan_listener

oracle-rac--srvctl add scan_listener

原创 Oracle 作者:zuoqi_71 时间:2014-03-31 01:05:44 0 删除 编辑

照着野档建rac只配了一个scan listener,之后要测试高可用,再加一个scan listener吧。

建议建3个IP地址的单一名称。如果持有某个SCAN VIP的节点发生故障,
则该 SCAN_VIP及其相关的侦听器都将被转移到集群的另一个可用节点上。


使用3个原因是
1.保证冗余。 2.保证 SCAN的处理能力。3.减轻每个节点上CPU的开销。

查看SCAN的信息:

C:\Users\Administrator>srvctl config scan
SCAN name: scan-cluster, Network: 1/10.120.240.0/255.255.240.0/pub
SCAN VIP name: scan1, IP: /scan-cluster/10.120.249.145


查看SCAN的运行位置:
C:\Users\Administrator>srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521


停止SCAN
C:\Users\Administrator>srvctl stop scan_listener

C:\Users\Administrator>srvctl stop scan

C:\Users\Administrator>srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running


修改hosts(2个接点都要改)
#scan
10.120.249.145  scan-cluster
10.120.249.147  scan-cluster


进行修改:
srvctl modify scan -n scan-cluster
srvctl modify scan_listener -u


确认:
C:\Users\Administrator>srvctl config scan
SCAN name: scan-cluster, Network: 1/10.120.240.0/255.255.240.0/pub
SCAN VIP name: scan1, IP: /scan-cluster/10.120.249.145
SCAN VIP name: scan2, IP: /scan-cluster/10.120.249.147


C:\Users\Administrator>srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node oradb1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node oradb2


启动:
srvctl start scan
srvctl start scan_listener


查看具体状态:
crsctl stat res -t

-----------------------------------------------------------------------------
Cluster Resources
-----------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr      1        ONLINE  ONLINE       oradb2
ora.LISTENER_SCAN2.lsnr      1        ONLINE  ONLINE       oradb1
ora.oradb1.vip      1        ONLINE  ONLINE       oradb1
ora.oradb2.vip      1        ONLINE  ONLINE       oradb2
ora.scan1.vip      1        ONLINE  ONLINE       oradb2
ora.scan2.vip      1        ONLINE  ONLINE       oradb1

 cat listener.ora

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2 = ON

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))
  )

ADR_BASE_LISTENER = C:\app\11.2.0.4\grid\log

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON

LISTENER_SCAN2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN2))
  )

LISTENER_SCAN1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
  )

ADR_BASE_LISTENER_SCAN2 = C:\app\11.2.0.4\grid\log

ADR_BASE_LISTENER_SCAN1 = C:\app\11.2.0.4\grid\log

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22193071/viewspace-1132900/,如需转载,请注明出处,否则将追究法律责任。

下一篇: oracle-rac-dns
请登录后发表评论 登录
全部评论

注册时间:2014-02-26

  • 博文量
    48
  • 访问量
    144460