【RAC】如何修改SCAN IP的IP地址、名称、端口等信息




RAC 增加SCAN IP :http://blog.itpub.net/26736162/viewspace-2155652/



How to Update the IP Address of the SCAN VIP Resources (ora.scan{n}.vip) (文档 ID 952903.1)

In this Document

Goal
Solution
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.

GOAL

The purpose of this document is to explain how to change the IP addresses associated with the SCAN VIPs in a 11gR2 Grid (CRS) environment.

The IP addresses associated with the SCAN VIP resources are initially set when the SCAN resources are created. 
Any changes to the DNS entry for the SCAN are not automatically propagated to the clusterware and need to be done manually.

This applies only to installations that are not using GNS.

The information in this note can also be helpful in cases where SCAN was originally configured with just one address and is now being expanded to accommodate three IP addresses.

SOLUTION

  1. Before the SCAN VIPs can be changed, the entry for the SCAN name on the Domain Name Server (DNS) needs to be updated with the new IP addresses. This usually will be done by a network administrator. To check the current setting, the following command can be used:

    nslookup <scan_name>
  2. 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
  3. Stop the SCAN listeners and SCAN
    $GRID_HOME/bin/srvctl stop scan_listener 
    $GRID_HOME/bin/srvctl stop scan
  4. Next refresh the SCAN VIPs with the new IP addresses from the DNS entry:
    $GRID_HOME/bin/srvctl modify scan -n <scan_name
  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
  6. Restart SCAN & SCAN listener:
    $GRID_HOME/bin/srvctl start scan 
    $GRID_HOME/bin/srvctl start scan_listener
  7. If the number of SCAN VIPs has changed, the SCAN listener needs to be updated:
    $GRID_HOME/bin/srvctl modify scan_listener -u
Below is an example using the following configuration:

  • The name of the SCAN is sales-scan.example.com
  • subnet of the public network is 10.100.10.0
  • netmask for the public network is 255.255.255.0
  • name of the public interface is eth1
  • old IP addresses: 10.100.10.81, 10.100.10.82 & 10.100.10.83
  • new IP addresses: 10.100.10.121, 10.100.10.122 & 10.100.10.123

Stopping & starting the SCAN VIPs/listeners can be done by the grid user, however the 'srvctl modify scan' command must be executed by root user, so it's practical to execute all steps as the root user.

A lookup of the SCAN on the DNS server shows that the entry has already been updated with the new IP addresses:

$ nslookup sales-scan.example.com 
Server:         dns1.example.com
Address:        10.100.10.70#53

Name:   sales-scan.example.com
Address: 10.100.10.123
Name:   sales-scan.example.com
Address: 10.100.10.122
Name:   sales-scan.example.com
Address: 10.100.10.121

Stop the SCAN listener and the SCAN VIP resources:

# $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
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
# $GRID_HOME/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running

The SCAN VIP resources still show the old IP addresses:

# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.83

Now tell CRS to update the SCAN VIP resources:

# $GRID_HOME/bin/srvctl modify scan -n sales-scan.example.com

To verify that the change was successful, check the SCAN configuration again:

# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.123

Start SCAN and the SCAN listener:

# $GRID_HOME/bin/srvctl start scan
# $GRID_HOME/bin/srvctl start scan_listener
Please note that if the SCAN VIPs are being changed because of a change of the subnet  of the public network additional changes may be required , e.g. the node VIPs and the network resource (ora.net1.network). For more information please refer to Document 276434.1 and the 11.2 documentation.


How to Modify SCAN Setting or SCAN Listener Port after Installation (文档 ID 972500.1)

In this Document

Goal
Solution
  A. To update SCAN setting
  B. To modify SCAN listener port
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.

GOAL

This note provides steps to update 11gR2 Grid Infrastructure (CRS) Single Client Access Name (SCAN) setting or SCAN listener port setting if it's not setup properly or if it's changed after setup.

Note:

1. This procedure does not apply when GNS is being used
2. Even though clustername and SCAN name is set to the same during 'typical' installation, changing SCAN name will not affect clustername as change of clustername requires deconfigure and reconfigure of the entire cluster.

SOLUTION

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 pay-scan.us.oracle.com
..
Name:   pay-scan.us.oracle.com
Address: 10.4.0.201
Name:   pay-scan.us.oracle.com
Address: 10.4.0.202
Name:   pay-scan.us.oracle.com
Address: 10.4.0.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 pay-scan.us.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=pay-scan.us.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: pay-scan.us.oracle.com, Network: 1/10.4.0.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /10.4.0.201/120.0.0.201
SCAN VIP name: scan2, IP: /10.4.0.202/120.0.0.202
SCAN VIP name: scan3, IP: /10.4.0.203/120.0.0.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.1.0.0/255.255.255.128/eth3, type static
Network exists: 2/10.1.1.0/255.255.255.128/eth4, type static

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

REFERENCES

NOTE:975457.1 - How to Troubleshoot Connectivity Issue with 11gR2 SCAN Name
NOTE:276434.1 - How to Modify Public Network Information including VIP in Oracle Clusterware
NOTE:887471.1 - PRVF-4664 PRVF-4657: Found inconsistent name resolution entries for SCAN name
NOTE:887522.1 - Grid Infrastructure Single Client Access Name (SCAN) Explained

NOTE:359277.1 - Changing Default Listener Port Number



小麦苗课程

小麦苗课堂开课啦,如下是现有的课程,欢迎咨询小麦苗:

课程名称

课时

上课时间

价格

OCP(从入门到专家)

每年1期,35课时左右/期

20:00-22:00

1588(可优惠)

OCM认证

每年N期,9课时/期

20:00-22:00

22888

高可用课程(rac+dg+ogg)

每年1期,20课时左右/期

20:00-22:00

1888(可优惠)

Oracle初级入门

每年1期,15课时左右/期

20:00-22:00

800

Oracle健康检查脚本

可微信或微店购买。

88

Oracle数据库技能直通车

包含如下3个课程:

①《11g OCP网络课程培训》(面向零基础) 价值1600元

②《11g OCM网络班课程培训》(Oracle技能合集)价值10000+元

③《RAC + DG + OGG 高可用网络班课程》 价值2000元

以上3个课程全部打包只要5888,只要5888所有课程带回家,终身指导!所有课程都是在线讲课,不是播放视频,课件全部赠送!

注意:以上OCP和OCM课程只包括培训课程,不包括考试费用。OCM提供培训+视频,但是不提供练习环境和资料。报名一次,OCP和高可用的课程可以免费终身循环听课。

5888

OCP+高可用(rac+dg+ogg)

报名OCP+高可用课程,可以优惠300元,优惠后的价格为3188.

3188(可优惠)

注意:

1、每次上课前30分钟答疑。

2、OCM实时答疑,提供和考试一样的练习模拟环境,只要按照老师讲的方式来练习,可以保证100%通过。

3、授课方式:YY语音网络直播讲课(非视频) + QQ互动答疑 + 视频复习

4、OCP课时可以根据大家学习情况进行增加或缩减。

5、以上所有课程均可循环听课。

6、12c OCM课程私聊。

7、Oracle初级入门课程,只教大家最实用+最常用的Oracle操作维护知识。

8、以上所有课程,可以加小麦苗微信(lhrbestxh)或QQ(646634621)详聊,优惠多多。

培训项目

连接地址

DB笔试面试历史连接

http://mp.weixin.qq.com/s/Vm5PqNcDcITkOr9cQg6T7w

OCP培训说明连接

https://mp.weixin.qq.com/s/2cymJ4xiBPtTaHu16HkiuA

OCM培训说明连接

https://mp.weixin.qq.com/s/7-R6Cz8RcJKduVv6YlAxJA

高可用(RAC+DG+OGG)培训说明连接

https://mp.weixin.qq.com/s/4vf042CnOdAD8zDyjUueiw

OCP最新题库解析历史连接(052)

http://mp.weixin.qq.com/s/bUgn4-uciSndji_pUbLZfA

微店地址

https://weidian.com/s/793741433?wfr=c&ifr=shopdetail


About Me

.............................................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub(http://blog.itpub.net/26736162/abstract/1/)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/abstract/1/

● 本文博客园地址:http://www.cnblogs.com/lhrbest

● 本文pdf版、个人简介及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址:http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

.............................................................................................................................................

● QQ群号:230161599(满)、618766405

● 微信群:可加我微信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友(646634621),注明添加缘由

● 于 2018-07-01 06:00 ~ 2018-07-31 24:00 在魔都完成

● 最新修改时间:2018-07-01 06:00 ~ 2018-07-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

.............................................................................................................................................

● 小麦苗的微店:https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

● 小麦苗出版的数据库类丛书:http://blog.itpub.net/26736162/viewspace-2142121/

● 小麦苗OCP、OCM、高可用网络班:http://blog.itpub.net/26736162/viewspace-2148098/

.............................................................................................................................................

使用微信客户端扫描下面的二维码来关注小麦苗的微信公众号(xiaomaimiaolhr)及QQ群(DBA宝典)、添加小麦苗微信,学习最实用的数据库技术。

小麦苗的微信公众号      小麦苗的DBA宝典QQ群2       小麦苗的微信二维码          小麦苗的微店

.............................................................................................................................................

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2157372/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26736162/viewspace-2157372/

【RAC】如何修改SCAN IP的IP地址、名称、端口等信息相关推荐

  1. Oracle 11G R2 RAC中的scan ip 的用途和基本原理【转】

    Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个 ...

  2. 修改用友服务器ip地址,用友服务器ip地址更换

    用友服务器ip地址更换 内容精选 换一换 若用户想要更换Ubuntu服务器的IP地址,则Mind Studio安装使用的IP地址也要随之更换,方法如下:如果env.conf文件中的IP配置为Ubunt ...

  3. c#获取本地ip地址网关子网掩码_教你如何修改路由器LAN口IP地址的方法

    现在绝大部分品牌或非品牌有线或无线路由器,其LAN口地址一般使用192.168.1.1或192.168.0.1网段,而使用此默认地址,既不安全,有时也不实用,比如局域网中电脑数过高,超过255台,则此 ...

  4. 计算机ip地址无法修改密码,手提电脑怎么修改无线网络的IP地址|无线网络怎么修改密码...

    许多朋友都有手提电脑,由于要经常变动地点,就要遇到修改IP地址的问题.那你知道怎样给手提电脑修改无线网络的IP地址吗?下面小编告诉你! 手提电脑修改无线网络的IP地址的方法 点击右键桌面"网 ...

  5. 修改10g RAC public or private or virtual IP [Oracle]

    首先启动HACMP,smit clstart #su - oracle rac2-> oifcfg getif en0  192.168.192.0  global  public en1  1 ...

  6. 路由器局域网设置_教你如何修改路由器LAN口IP地址的方法

    现在绝大部分品牌或非品牌有线或无线路由器,其LAN口地址一般使用192.168.1.1或192.168.0.1网段,而使用此默认地址,既不安全,有时也不实用,比如局域网中电脑数过高,超过255台,则此 ...

  7. 批处理修改计算机名为ip,批处理修改计算机名和IP地址

    批处理修改计算机名和IP地址 (2008-02-26 13:44:18) 标签: 杂谈 分类: 网络 @echo off color F2 set /p name=请输您的计算机名: reg add ...

  8. 计算机ip怎么换路由器,教你如何修改路由器LAN口IP地址的方法

    现在绝大部分品牌或非品牌有线或无线路由器,其LAN口地址一般使用192.168.1.1或192.168.0.1网段,而使用此默认地址,既不安全,有时也不实用,比如局域网中电脑数过高,超过255台,则此 ...

  9. 修改ARM开发板IP地址

    修改ARM开发板IP地址 转载自:https://www.linuxidc.com/Linux/2011-06/36728.htm 要修改ARM开发板的IP,如果是yaffs2文件,可以 1.首先要修 ...

最新文章

  1. linux crontab 说明
  2. 微信小程序- 初试小程序之tabbar(选项卡,底部导航)的使用
  3. centos解压zip命令_Linux日常运维(5)—常用压缩包解压命令整理
  4. python之moviepy库的安装与使用
  5. Elementary OS 系统Java8环境的配置
  6. [Linux]共享内存
  7. WWDC 2018: Shortcuts 快速入门
  8. Python字典按值排序、包含字典的列表按字典值排序的方法
  9. python背景图颜色_python – 使图形透明与彩色背景
  10. GDKOI 2016
  11. sqlserver2008r2 还原bak文件
  12. 故障解决:三块300GSAS硬盘 一块硬盘状态灯为红色
  13. (转)一张图学会Dockerfile
  14. xsd文件生成class
  15. VCC、VDD、VSS、GND分别代表什么呢?
  16. MATLAB如何导出高分辨率的模型图片、PDF
  17. IEEE Fellow、AAAS Fellow 同日公布,清华唐杰、京东郑宇等数十位华人入选
  18. Android集成谷歌定位sdk,Android 地图sdk,集成了百度、高德、谷歌三种地图
  19. 【C/C++练习题】斐波那契数列
  20. python分割图片数字_python实现图片中文字分割效果

热门文章

  1. 转发:审稿人的拒稿意见
  2. 百度网盘提速加速方法
  3. 黑猫带你学eMMC协议第25篇:eMMC命令队列详解(CMDQ)
  4. 4G PA.FLASH.套料手机平板通讯智能家居无人机大小物料大量现货供应!样品最新停产均有!
  5. Win11系统点击wifi图标没有反应怎么解决?
  6. 防止域名被劫持的七种方法域名被劫持怎么办
  7. 块级、内联、内联块级
  8. 基于Citespace和vosviewer文献计量学可视化SCI论文高效写作方法
  9. OSPF路由协议及工作原理(一)
  10. OpenCV读取图片和保存图片全黑