标签:code ocr alter ESS top cluster tar clust 虚拟
本文只介绍同网段公网IP、虚拟IP以及scan的变更,稍后会介绍跨网段的IP变更。在两个节点分别停止集群服务:
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
[root@odb10 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
这里使用了hosts文件,直接编辑即可。如果使用了dns,需要修改dns的解析记录。若解析不成功会导致变更失败。
由于变更了公网IP,需要重启才能生效。重启完成后,对应的公网IP和虚拟IP都会改变。而oracle集群服务也会自动启动,并把新的公网IP和虚拟IP信息写入ocr中。到此,公网IP和虚拟IP变更完成。
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl config scan
SCAN name: scan01, Network: 1/192.168.120.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /scan01/192.168.120.37
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl stop scan_listener
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl stop scan
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
在更改前,确保新的scan可以通过dns解析或者以加入hosts文件,否则会出现如下报错:
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl modify scan -n scan02
PRCS-1016 : Failed to resolve Single Client Access Name scan02
变更后验证:
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl config scan
SCAN name: scan02, Network: 1/192.168.120.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /scan02/192.168.120.42
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl start scan
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl start scan_listener
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node odb10
[root@odb09 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node odb10
由于变更scan名称,所以还需要修改数据库参数remote_listener,如下:
SQL> show parameter remote_listener
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
remote_listener string scan01:1521
变更后如下:
SQL> alter system set remote_listener=‘scan02:1521‘ scope=spfile;
SQL> show parameter remote_listener
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
remote_listener string scan02:1521
标签:code ocr alter ESS top cluster tar clust 虚拟
原文地址:https://blog.51cto.com/candon123/2438277