RAC替换SCAN NAME

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值