在ORACLE 11R2 版本中引入了SCAN,SCAN的最主要作用就是在rac中增加节点或删除节点对客户端来说是完全透明的:
1:删除SCAN
在删除scan之前必须要把scan服务停掉
-
[grid@rac1 ~]$ srvctl stop scan_listener
-
[grid@rac1 ~]$ srvctl stop scan
-
[grid@rac1 ~]$ crs_stat -t
-
Name Type Target State Host
-
------------------------------------------------------------
-
ora.DATA.dg ora....up.type ONLINE ONLINE rac1
-
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
-
ora....N1.lsnr ora....er.type OFFLINE OFFLINE
-
ora....N2.lsnr ora....er.type OFFLINE OFFLINE
-
ora....N3.lsnr ora....er.type OFFLINE OFFLINE
-
ora.asm ora.asm.type ONLINE ONLINE rac1
-
ora.eons ora.eons.type ONLINE ONLINE rac1
-
ora.gsd ora.gsd.type ONLINE ONLINE rac1
-
ora....network ora....rk.type ONLINE ONLINE rac1
-
ora.oc4j ora.oc4j.type ONLINE ONLINE rac2
-
ora.ons ora.ons.type ONLINE ONLINE rac1
-
ora.orcl.db ora....se.type ONLINE ONLINE rac1
-
ora....SM1.asm application ONLINE ONLINE rac1
-
ora....C1.lsnr application ONLINE ONLINE rac1
-
ora.rac1.gsd application ONLINE ONLINE rac1
-
ora.rac1.ons application ONLINE ONLINE rac1
-
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
-
ora....SM2.asm application ONLINE ONLINE rac2
-
ora....C2.lsnr application ONLINE ONLINE rac2
-
ora.rac2.gsd application ONLINE ONLINE rac2
-
ora.rac2.ons application ONLINE ONLINE rac2
-
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
-
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
-
ora.scan1.vip ora....ip.type OFFLINE OFFLINE
-
ora.scan2.vip ora....ip.type OFFLINE OFFLINE
-
ora.scan3.vip ora....ip.type OFFLINE OFFLINE
-
[grid@rac1 ~]$
删除scan,需要用root的权限
-
[root@rac1 ~]# cd /u01/app/grid/11.2.0/bin/
-
Display all 381 possibilities? (y or n)
-
[root@rac1 ~]# cd /u01/app/grid/11.2.0/bin/
-
[root@rac1 bin]# ./srvctl remove scan_listener
-
Remove scan listener? (y/[n]) y
-
[root@rac1 bin]# ./srvctl remove scan
-
Remove the scan? (y/[n]) y
-
[root@rac1 bin]# ./srvctl status scan
-
PRCS-1025 : Could not find Single Client Access Name Virtual Internet Protocol(VIP) resources TYPE=ora.scan_vip.type
-
[root@rac1 bin]# ./srvctl status scan_listener
-
PRCS-1026 : Could not find Single Client Access Name listener resources TYPE=ora.scan_listener.type
2:增加scan
在增加scan之前,得保证SCAN地址都能正确的解析出来
-
[root@rac1 bin]# nslookup rac-scan
-
Server: 172.72.15.200
-
Address: 172.72.15.200#53
-
-
Name: rac-scan.sb.com
-
Address: 172.72.15.191
-
Name: rac-scan.sb.com
-
Address: 172.72.15.192
-
Name: rac-scan.sb.com
-
Address: 172.72.15.190
-
-
[root@rac1 bin]#
增加scan
-
[root@rac1 bin]# ./srvctl add scan -n rac-scan
-
[root@rac1 bin]# ./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@rac1 bin]# ./srvctl add scan_listener
-
[root@rac1 bin]# ./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
3:重启crs服务
./crsctl stop cluster -all
./crsctl start cluster -all
-
[root@rac1 bin]# ./srvctl status scan_listener
-
SCAN Listener LISTENER_SCAN1 is enabled
-
SCAN listener LISTENER_SCAN1 is running on node rac1
-
SCAN Listener LISTENER_SCAN2 is enabled
-
SCAN listener LISTENER_SCAN2 is running on node rac2
-
SCAN Listener LISTENER_SCAN3 is enabled
-
SCAN listener LISTENER_SCAN3 is running on node rac1
scan的地址分配到各个节点上去了!
阅读(6436) | 评论(2) | 转发(0) |