How to Modify SCAN Setting or SCAN Listener Port after Installat

举报
snowofsummer 发表于 2021/01/14 16:29:35 2021/01/14
【摘要】 A. To update SCAN setting1. As per documentation "Oracle Grid Infrastructure Installation Guide", Oracle strongly recommend to configure SCAN name in either DNS or GNS as /etc/hosts file can only r...

A. To update SCAN setting

1. As per documentation "Oracle Grid Infrastructure Installation Guide", Oracle strongly recommend to configure SCAN name in either DNS or GNS as /etc/hosts file can only resolve to one IP address.

SCAN IP must be in same subnet as public and VIP. If the new SCAN IP will be in different subnet, refer to note 276434.1 to change nodeapps/network resource first.

1a. If you intend to use /etc/hosts for SCAN name resolution, the same and only entry for SCAN name must exist on all nodes.

1b. If you intend to use DNS for SCAN name resolution, remove entries for SCAN name from /etc/hosts on all nodes, and make sure nslookup returns good result on all nodes, for example:

$ nslookup <scan>.oracle.com
..
Name:   <scan>.oracle.com
Address: 10.x.x.201
Name:  <scan>.oracle.com
Address: 10.x.x.202
Name:  <scan>.oracle.com
Address: 10.x.x.203


2. Once #1a or #1b is configured properly, execute the following to modify:

If name resolution for SCAN is being switched from local hosts file to DNS, be sure to remove SCAN name in local hosts file on all nodes prior to execute below commands.

2.1. To modify SCAN name or SCAN VIP addresses:

2.1.1. As grid user stop resources:

$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl stop scan


2.1.2. As root user modify SCAN:

# $GRID_HOME/bin/srvctl modify scan -n <scan>.oracle.com 

### For 11.2.0.1 only, if you intend to change SCAN name, due to bug 9603829, execute the following:

# $GRID_HOME/bin/crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=<new SCAN name>"

### Example:
# $GRID_HOME/bin/crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=<scan>.oracle.com"


Once SCAN name is changed, update database init.ora/spfile parameter remote_listener to the new one.

2.1.3. As grid user modify and start resources:

$ $GRID_HOME/bin/srvctl modify scan_listener -u
$ $GRID_HOME/bin/srvctl start scan_listener


2.1.4. To confirm the change

$ $GRID_HOME/bin/srvctl config scan
SCAN name: <scan>.oracle.com, Network: 1/10.x.x.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /10.x.x.201/120.x.x.201
SCAN VIP name: scan2, IP: /10.x.x.202/120.x.x.202
SCAN VIP name: scan3, IP: /10.x.x.203/120.x.x.203

$ $GRID_HOME/bin/srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521



2.2. To change SCAN to be on second network:

By default, SCAN will be configured on first public network (ora.net1.network), however in multiple public network environment, SCAN can run on second or other network.

There's no option to modify SCAN to use non-first network, to change to second or other network, scan_listener and scan resources need to be removed and added back.

In this example, we'll move SCAN from net1 to net2

$ $GRID_HOME/bin/srvctl config network
Network exists: 1/10.x.x.0/255.255.255.128/eth3, type static
Network exists: 2/10.x.x.0/255.255.255.128/eth4, type static

You can also modify the scan in the second network like below on 12.2

srvctl modify scan_listener -netnum 2 -update -invitednodes "node1,node2"


2.2.1. As grid user stop resources and remove scan_listener:

$ $GRID_HOME/bin/srvctl stop scan_listener  $GRID_HOME/bin/srvctl stop scan
$ $GRID_HOME/bin/srvctl remove scan_listener -f


2.2.2. As root user remove and add SCAN:

# $GRID_HOME/bin/srvctl remove scan -f
#$GRID_HOME/bin/srvctl add scan -n <scan-name> -k 2


Once SCAN name is changed, update database init.ora/spfile parameter remote_listener to the new one.

2.2.3. As grid user add scan_listener and start resources:

$ $GRID_HOME/bin/srvctl add scan_listener-p <port>
$ $GRID_HOME/bin/srvctl start scan_listener



B. To modify SCAN listener port

As grid user:

1. Modify SCAN listener port:

$GRID_HOME/bin/srvctl modify scan_listener -p <new-SCAN-port>

Update 11gR2 database init.ora parameter: alter system set remote_listener='<SCAN-name>:<new-port-number>' scope=both;



2. Restart SCAN listener so the new port will be effective:

$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl start scan_listener



3. Confirm the change:

$GRID_HOME/bin/srvctl config scan_listener

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。