11gr2环境需要更改scan ip, 基本的原理就是更改dns或者hosts文件内的ip地址,然后通过srvctl 命令去同步crs内的信息,完成scan ip的修改。 before, need modify all the node /etc/hosts, set the new ip address. 1. stop the scan listener and the scan v
11gr2环境需要更改scan ip, 基本的原理就是更改dns或者hosts文件内的ip地址,然后通过srvctl 命令去同步crs内的信息,完成scan ip的修改。
before, need modify all the node /etc/hosts, set the new ip address.
1.
stop the scan listener and the scan vip resources:
2.需要先停止服务,测试时候由于没有停止服务,最后出现scan listener没有启动,后手动启动,同时parameter remote_listener值丢失,重新设置的。
# $grid_home/bin/srvctl stop scan_listener
# $grid_home/bin/srvctl stop scan
# $grid_home/bin/srvctl status scan
scan vip scan1 is enabled scan vip scan1 is not running
# $grid_home/bin/srvctl status scan_listener
scan listener listener_scan1 is enabled scan listener listener_scan1 is not running
3.
# to check the current ip address(es) of the scan vips, run the following commands as the root user:
$grid_home/bin/srvctl config scan
scan name: qr01-scan, network: 1/192.0.2.0/255.255.255.0/eth0 scan vip name: scan1, ip: /qr01-scan.example.com/192.0.2.21
4.
# next refresh the scan vips with the new ip addresses from the dns entry:
$grid_home/bin/srvctl modify scan -n
5.
# to check if the scan vips have been changed, run the following command, it should now show the new ip addresses.
$grid_home/bin/srvctl config scan
scan name: qr01-scan, network: 1/192.0.2.0/255.255.255.0/eth0 scan vip name: scan1, ip: /qr01-scan.example.com/192.0.2.31
6.
start scan and the scan listener:
# $grid_home/bin/srvctl start scan
# $grid_home/bin/srvctl start scan_listener
7.
check parameter
sql> show parameter remote
name type value ------------------------------------ ----------- ------------------------------ remote_listener string qr01-scan:1521
8.
check listener status
$ps -ef|grep tns
oracle 4992 1 0 16:12 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr listener_scan1 -inherit oracle 5004 1 0 16:12 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr listener -inherit oracle 9816 5529 0 17:45 pts/0 00:00:00 grep tns
需要到grid用户下执行下面命令
$lsnrctl status listener_scan1
lsnrctl for linux: version 11.2.0.2.0 - production on 07-may-2012 17:46:25 copyright (c) 1991, 2010, oracle. all rights reserved. connecting to (description=(address=(protocol=ipc)(key=listener_scan1))) status of the listener ------------------------ alias listener_scan1 version tnslsnr for linux: version 11.2.0.2.0 - production start date 07-may-2012 12:12:11 uptime 0 days 1 hr. 34 min. 14 sec trace level off security on: local os authentication snmp off listener parameter file /u01/app/11.2.0/grid/network/admin/listener.ora listener log file /u01/app/11.2.0/grid/log/diag/tnslsnr/qr01db02/listener_scan1/alert/log.xml listening endpoints summary... (description=(address=(protocol=ipc)(key=listener_scan1))) (description=(address=(protocol=tcp)(host=192.0.2.31)(port=1521))) services summary... service dbm.example.com has 2 instance(s). instance dbm1, status ready, has 1 handler(s) for this service... instance dbm2, status ready, has 1 handler(s) for this service... service dbmxdb.example.com has 2 instance(s). instance dbm1, status ready, has 1 handler(s) for this service... instance dbm2, status ready, has 1 handler(s) for this service... the command completed successfully