grid@shhostdo0048d:/home/grid> crs_stat -t |grep vip
ora.scan1.vip ora…ip.type ONLINE ONLINE shdc…048d
ora.scan2.vip ora…ip.type ONLINE ONLINE shdc…048e
ora.scan3.vip ora…ip.type ONLINE ONLINE shdc…048e
ora…48d.vip ora…t1.type ONLINE ONLINE shdc…048d
ora…48e.vip ora…t1.type ONLINE ONLINE shdc…048e
grid@shhostdo0048d:/home/grid> srvctl config scan
SCAN name: rachostnamedvb-scan.xxxxx.com, Network: 1/10.132.124.0/255.255.255.0/bond0
SCAN VIP name: scan1, IP: /rachostnamedvb-scan.xxxxx.com/10.132.124.39
SCAN VIP name: scan2, IP: /rachostnamedvb-scan.xxxxx.com/10.132.124.40
SCAN VIP name: scan3, IP: /rachostnamedvb-scan.xxxxx.com/10.132.124.38
grid@shhostdo0048d:/home/grid> srvctl stop scan_listener
grid@shhostdo0048d:/home/grid> srvctl stop scan
grid@shhostdo0048d:/home/grid> 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
grid@shhostdo0048d:/home/grid> nslookup rachostnametmp-scan
Server: 192.168.20.1
Address: 192.168.20.1#53
Name: rachostnametmp-scan.xxxxx.com
Address: 10.132.124.69
Name: rachostnametmp-scan.xxxxx.com
Address: 10.132.124.170
Name: rachostnametmp-scan.xxxxx.com
Address: 10.132.124.70
grid@shhostdo0048d:/home/grid> nslookup rachostnametmp-scan.xxxxx.com
Server: 192.168.20.1
Address: 192.168.20.1#53
Name: rachostnametmp-scan.xxxxx.com
Address: 10.132.124.170
Name: rachostnametmp-scan.xxxxx.com
Address: 10.132.124.70
Name: rachostnametmp-scan.xxxxx.com
Address: 10.132.124.69
grid@shhostdo0048d:/home/grid> which srvctl
/opt/apps/grid/product/11g2/grid_home2/bin/srvctl
grid@shhostdo0048d:/home/grid> exit
logout
[3zengz036@shhostdo0048d ~]$ sudo su -
Last login: Fri Sep 20 10:54:53 CST 2024
[root@shhostdo0048d ~]# /opt/apps/grid/product/11g2/grid_home2/bin/srvctl modify scan -n rachostnametmp-scan.xxxxx.com
[root@shhostdo0048d ~]# srvctl config -h
[root@shhostdo0048d ~]# srvctl config scan
SCAN name: rachostnametmp-scan.xxxxx.com, Network: 1/10.132.124.0/255.255.255.0/bond0
SCAN VIP name: scan1, IP: /rachostnametmp-scan.xxxxx.com/10.132.124.70
SCAN VIP name: scan2, IP: /rachostnametmp-scan.xxxxx.com/10.132.124.69
SCAN VIP name: scan3, IP: /rachostnametmp-scan.xxxxx.com/10.132.124.170
[root@shhostdo0048d ~]# srvctl start scan
[root@shhostdo0048d ~]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node shhostdo0048d
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node shhostdo0048e
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
[root@shhostdo0048d ~]# srvctl start scan_listener
[root@shhostdo0048d ~]# srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node shhostdo0048d
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node shhostdo0048e
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node shhostdo0048d
oracle@shhostdo0048d:/home/oracle> export ORACLE_SID=simshq4
oracle@shhostdo0048d:/home/oracle> sqlplus / as sysdba
alter system set remote_listener=‘rachostnametmp-scan.xxxxx.com:1541’ sid=‘simshq4’;
alter system set remote_listener=‘rachostnametmp-scan.xxxxx.com:1541’ sid=‘simshq5’;
srvctl stop database -d simshq
srvctl start database -d simshq
#############
查看SCAN状态:
su - grid
[grid@rac1 ~]$ crs_stat -t |grep vip
ora.rac1.vip ora…t1.type ONLINE ONLINE rac1
ora.rac2.vip ora…t1.type ONLINE ONLINE rac2
ora.scan1.vip ora…ip.type ONLINE ONLINE rac1
$ srvctl config scan
SCAN name: racscan, Network: 1/192.168.235.0/255.255.255.0/ens160
SCAN VIP name: scan1, IP: /racscan/192.168.235.64
修改SCAN
先停止SCAN:
srvctl stop scan_listener
srvctl stop scan
srvctl status scan #确认停止后再修改
再修改SCAN信息
修改SCAN IP和SCAN name
nslookup racscan
nslookup racscan.com
$ which srvctl
/u01/app/11.2.0/grid/bin/srvctl
exit # to root
修改SCAN name(例如将 racscannew)
srvctl modify scan -n racscannew
查看命令帮助信息
srvctl config -h
srvctl -h
查看scan配置信息
srvctl config scan
重启SCAN:
srvctl start scan
srvctl start scan_listener
srvctl status scan
查看scan状态
[grid@rac1 ~]$ srvctl status scan