Oracle11gR2_RAC_SCAN搭配DNS实例On REHL5.3(2)

1 停止及移除目前的scan

[oracle@ksa033 ~]$ crsctl stop resource ora.scan1.vip
CRS-2529: Unable to act on 'ora.scan1.vip' because that would require stopping or relocating 'ora.LISTENER_SCAN1.lsnr',d
CRS-4000: Command Stop failed, or completed with errors.
[oracle@ksa033 ~]$ crsctl stop resource ora.LISTENER_SCAN1.lsnr
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'ksa034'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'ksa034' succeeded

[root@ksa033 oracle]# srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
[root@ksa033 oracle]# srvctl remove scan_listener
Remove scan listener? (y/[n]) y

[oracle@ksa033 ~]$ crsctl stop resource ora.scan1.vip
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'ksa034'
CRS-2677: Stop of 'ora.scan1.vip' on 'ksa034' succeeded
[oracle@ksa033 ~]$ srvctl remove scan
Remove the scan? (y/[n]) y
PRCS-1024 : Failed to remove Single Client Access Name Virtual Internet Protocol(VIP) resources ksa-scan.cktire.com
PRCN-2018 : Current user oracle is not a privileged user

[oracle@ksa033 ~]$ su
Password:
[root@ksa033 oracle]# srvctl remove scan
Remove the scan? (y/[n]) y

Check the status of SCAN---

[oracle@ksa034 ~]$ srvctl status scan;
PRCS-1025 : Could not find Single Client Access Name Virtual Internet Protocol(VIP) resources TYPE=ora.scan_vip.type
[oracle@ksa034 ~]$ srvctl config scan;
PRCS-1025 : Could not find Single Client Access Name Virtual Internet Protocol(VIP) resources TYPE=ora.scan_vip.type
[root@ksa033 oracle]# crsctl status resource -t;
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
 --------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE
ora.ksa.db
      1        ONLINE  ONLINE       ksa033                   Open
      2        ONLINE  ONLINE       ksa034                   Open
ora.ksa033.vip
      1        ONLINE  ONLINE       ksa033
ora.ksa034.vip
      1        ONLINE  ONLINE       ksa034
ora.oc4j
      1        OFFLINE OFFLINE

确定/etc/hosts档未有对scan的解析---本例是拿掉hosts里面的

#ksa-scan

10.150.161.81           ksa-scan.cktire.com               ksa-scan

Add the scan network to crs resource---

[root@ksa034 oracle]# crs_stop -all

[root@ksa034 oracle]# crs_start -all

[root@ksa034 oracle]# srvctl status scan;
PRCS-1025 : Could not find Single Client Access Name Virtual Internet Protocol(VIP) resources TYPE=ora.scan_vip.type
 [root@ksa034 oracle]# srvctl add scan -n ksa-scan.cktire.com -k 2 -S 10.150.161.81/255.255.248.0/eth0
[root@ksa034 oracle]# srvctl status scan;
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
[root@ksa034 oracle]# srvctl config scan;
SCAN name: ksa-scan.cktire.com, Network: 2/10.150.161.81/255.255.248.0/eth0
SCAN VIP name: scan1, IP: /ksa-scan.cktire.com/10.150.161.81
SCAN VIP name: scan2, IP: /ksa-scan.cktire.com/10.150.161.82
SCAN VIP name: scan3, IP: /ksa-scan.cktire.com/10.150.161.83

[root@ksa033 oracle]# srvctl add scan_listener -p 1521
[root@ksa033 oracle]# srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running
[root@ksa033 oracle]# srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
启动scan和scan_listener服务前确认配置状态

[root@ksa034 oracle]# crsctl status resource -t;

Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE
ora.LISTENER_SCAN2.lsnr
      1        OFFLINE OFFLINE
ora.LISTENER_SCAN3.lsnr
      1        OFFLINE OFFLINE
ora.ksa.db
      1        ONLINE  ONLINE       ksa033                   Open
      2        ONLINE  ONLINE       ksa034                   Open
ora.ksa033.vip
      1        ONLINE  ONLINE       ksa033
ora.ksa034.vip
      1        ONLINE  ONLINE       ksa034
ora.oc4j
      1        OFFLINE OFFLINE
ora.scan1.vip
      1        OFFLINE OFFLINE
ora.scan2.vip
      1        OFFLINE OFFLINE
ora.scan3.vip
      1        OFFLINE OFFLINE

正式启动scan_listener和scan服务,检查状态如下:

[root@ksa034 oracle]# srvctl start scan;

[root@ksa034 oracle]# srvctl start scan_listener

[root@ksa034 oracle]# crsctl status resource -t;

--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ksa034
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ksa033
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ksa033
ora.ksa.db
      1        ONLINE  ONLINE       ksa033                   Open
      2        ONLINE  ONLINE       ksa034                   Open
ora.ksa033.vip
      1        ONLINE  ONLINE       ksa033
ora.ksa034.vip
      1        ONLINE  ONLINE       ksa034
ora.oc4j
      1        OFFLINE OFFLINE
ora.scan1.vip
      1        ONLINE  ONLINE       ksa034
ora.scan2.vip
      1        ONLINE  ONLINE       ksa033
ora.scan3.vip
      1        ONLINE  ONLINE       ksa033

结束!

 

 

你可能感兴趣的:(oracle,dns,RAC,scan,SCAN_LISTENER)