oracle-rac--srvctl add scan_listener

kunlunzhiying發表於2016-11-29

照著野檔建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/28211342/viewspace-2129297/,如需轉載,請註明出處,否則將追究法律責任。

相關文章