RAC 增加SCAN IP
对新配置的oracle RAC环境增配2个SCAN IP地址,192.168.59.175以及192.168.59.176。
1.1.1.1 配置前信息
默认情况下配置RA 只有1个scan IP,1个 scan listener。
查看scan的配置信息
[root@raclhr-11gR2-N1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#Public IP
192.168.59.170 raclhr-11gR2-N1
192.168.59.171 raclhr-11gR2-N2
#Private IP
192.168.2.110 raclhr-11gR2-N1-priv
192.168.2.111 raclhr-11gR2-N2-priv
#Virtual IP
192.168.59.172 raclhr-11gR2-N1-vip
192.168.59.173 raclhr-11gR2-N2-vip
#Scan IP
192.168.59.174 raclhr-11gR2-scan
[root@raclhr-11gR2-N1 ~]# srvctl config scan
SCAN name: raclhr-11gR2-scan, Network: 1/192.168.59.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /raclhr-11gR2-scan/192.168.59.174
查看scan的状态以及scan ip所处节点
[root@raclhr-11gR2-N1 ~]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node raclhr-11gr2-n2
[root@raclhr-11gR2-N1 ~]#
查看scan listener
[root@raclhr-11gR2-N1 ~]# srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
[root@raclhr-11gR2-N1 ~]#
1.1.1.2 修改rac所有节点的/etc/hosts信息
[root@raclhr-11gR2-N1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#Public IP
192.168.59.170 raclhr-11gR2-N1
192.168.59.171 raclhr-11gR2-N2
#Private IP
192.168.2.110 raclhr-11gR2-N1-priv
192.168.2.111 raclhr-11gR2-N2-priv
#Virtual IP
192.168.59.172 raclhr-11gR2-N1-vip
192.168.59.173 raclhr-11gR2-N2-vip
#Scan IP
192.168.59.174 raclhr-11gR2-scan
192.168.59.175 raclhr-11gR2-scan ----->>>>新增的SCAN IP
192.168.59.176 raclhr-11gR2-scan ----->>>>新增的SCAN IP
1.1.1.3 停止scan 监听,注意先停监听才能停scan
srvctl stop scan_listener
srvctl stop scan
srvctl status scan_listener
srvctl status scan
1.1.1.4 配置scan,注意需要用root权限执行
修改scan信息,-n 后面接 hosts中的san ip 网络名:
srvctl modify scan -n raclhr-11gR2-scan
[root@raclhr-11gR2-N1 ~]# srvctl modify scan -h
Modifies the SCAN name.
Usage: srvctl modify scan -n
-n Domain name qualified SCAN name
-h Print usage
[root@raclhr-11gR2-N1 ~]#
[root@raclhr-11gR2-N1 ~]# srvctl modify scan -n raclhr-11gR2-scan
添加scanIP的监听,若不执行该命令,将只有一个listener_scan1监听,执行后将根据scan ip数自动增加listener_scan2,listener_scan3.
srvctl modify scan_listener -u
[root@raclhr-11gR2-N1 ~]# srvctl modify scan_listener -h
Modifies the SCAN listeners so that the number of SCAN listeners is the same as the number of SCAN VIPs or modifies the SCAN listener endpoints.
Usage: srvctl modify scan_listener {-u|-p [TCP:][/IPC:][/NMP:][/TCPS:] [/SDP:]}
-u Update SCAN listeners to match the number of SCAN VIPs
-p [TCP:][/IPC:][/NMP:][/TCPS:] [/SDP:] SCAN Listener endpoints
-h Print usage
[root@raclhr-11gR2-N1 ~]# srvctl modify scan_listener -u
[root@raclhr-11gR2-N1 ~]#
[root@raclhr-11gR2-N1 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
........
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN2.lsnr
1 OFFLINE OFFLINE
ora.LISTENER_SCAN3.lsnr
1 OFFLINE OFFLINE
ora.cvu
1 ONLINE ONLINE raclhr-11gr2-n1
ora.lhrrac1.db
1 ONLINE ONLINE raclhr-11gr2-n1 Open
2 ONLINE ONLINE raclhr-11gr2-n2 Open
ora.oc4j
1 ONLINE ONLINE raclhr-11gr2-n1
ora.raclhr-11gr2-n1.vip
1 ONLINE ONLINE raclhr-11gr2-n1
ora.raclhr-11gr2-n2.vip
1 ONLINE ONLINE raclhr-11gr2-n2
ora.scan1.vip
1 OFFLINE OFFLINE
ora.scan2.vip
1 OFFLINE OFFLINE
ora.scan3.vip
1 OFFLINE OFFLINE
1.1.1.5 启动scan
srvctl start scan
srvctl start scan_listener
srvctl status scan
srvctl status scan_listener
srvctl config scan
[root@raclhr-11gR2-N1 ~]# srvctl start scan
[root@raclhr-11gR2-N1 ~]# srvctl start scan_listener
[root@raclhr-11gR2-N1 ~]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node raclhr-11gr2-n2
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node raclhr-11gr2-n1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node raclhr-11gr2-n1
[root@raclhr-11gR2-N1 ~]# srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node raclhr-11gr2-n2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node raclhr-11gr2-n1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node raclhr-11gr2-n1
[root@raclhr-11gR2-N1 ~]#
[root@raclhr-11gR2-N1 ~]# srvctl config scan
SCAN name: raclhr-11gR2-scan, Network: 1/192.168.59.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /raclhr-11gR2-scan/192.168.59.174
SCAN VIP name: scan2, IP: /raclhr-11gR2-scan/192.168.59.175
SCAN VIP name: scan3, IP: /raclhr-11gR2-scan/192.168.59.176
[root@raclhr-11gR2-N1 ~]#
1.1.1.6 查看SCAN1和SCAN2的内容
重启集群环境后,可以看到如下内容:
[root@raclhr-11gR2-N1 admin]# lsnrctl status listener_scan3
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUN-2018 15:24:13
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN3
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 05-JUN-2018 15:18:55
Uptime 0 days 0 hr. 5 min. 18 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/raclhr-11gR2-N1/listener_scan3/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN3)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.59.176)(PORT=1521)))
Services Summary...
Service "+ASM" has 2 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "lhrrac1" has 2 instance(s).
Instance "lhrrac11", status READY, has 1 handler(s) for this service...
Instance "lhrrac12", status READY, has 1 handler(s) for this service...
Service "lhrrac1XDB" has 2 instance(s).
Instance "lhrrac11", status READY, has 1 handler(s) for this service...
Instance "lhrrac12", status READY, has 1 handler(s) for this service...
Service "lhrxxt" has 2 instance(s).
Instance "lhrrac11", status READY, has 1 handler(s) for this service...
Instance "lhrrac12", status READY, has 1 handler(s) for this service...
The command completed successfully
[root@raclhr-11gR2-N1 admin]# lsnrctl status listener_scan2
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUN-2018 15:24:16
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCAN2
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 05-JUN-2018 15:18:55
Uptime 0 days 0 hr. 5 min. 21 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/raclhr-11gR2-N1/listener_scan2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.59.175)(PORT=1521)))
Services Summary...
Service "+ASM" has 2 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "lhrrac1" has 2 instance(s).
Instance "lhrrac11", status READY, has 1 handler(s) for this service...
Instance "lhrrac12", status READY, has 1 handler(s) for this service...
Service "lhrrac1XDB" has 2 instance(s).
Instance "lhrrac11", status READY, has 1 handler(s) for this service...
Instance "lhrrac12", status READY, has 1 handler(s) for this service...
Service "lhrxxt" has 2 instance(s).
Instance "lhrrac11", status READY, has 1 handler(s) for this service...
Instance "lhrrac12", status READY, has 1 handler(s) for this service...
The command completed successfully
[root@raclhr-11gR2-N1 admin]#
小麦苗课程
小麦苗课堂开课啦,如下是现有的课程,欢迎咨询小麦苗:
课程名称 | 课时 | 上课时间(可根据情况调整) | 价格 | |
OCP(从入门到专家) | 每年1期,35课时左右/期 | 每周一、周三、周四、周六 | 20:00-22:00 | 1600 |
OCM认证 | 每年N期,9课时/期 | 每周二、周五 | 20:00-22:00 | 23000 |
高可用课程(rac+dg+ogg) | 每年1期,20课时左右/期 | 每周一、周三、周四、周六 | 20:00-22:00 | 2000 |
Oracle初级入门 | 每年1期,15课时左右/期 | 每周一、周三、周四、周六 | 20:00-22:00 | 800 |
Oracle健康检查脚本 | 可微信或微店购买。 | 100 | ||
Oracle数据库技能直通车 | 包含如下3个课程: ①《11g OCP网络课程培训》(面向零基础) 价值1600元 ②《11g OCM网络班课程培训》(Oracle技能合集)价值10000+元 ③《RAC + DG + OGG 高可用网络班课程》 价值2000元 以上3个课程全部打包只要5888,只要5888所有课程带回家,终身指导!所有课程都是在线讲课,不是播放视频,课件全部赠送! 注意:以上OCP和OCM课程只包括培训课程,不包括考试费用。 | 5888 |
注意:
1、每次上课前30分钟答疑。
2、OCM实时答疑,提供和考试一样的练习模拟环境,只要按照老师讲的方式来练习,可以保证100%通过。
3、授课方式:YY语音网络直播讲课(非视频) + QQ互动答疑 + 视频复习。其中,OCM在上海开设现场班。
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 |
● 网名:小麦苗
● QQ:646634621
● QQ群:618766405
● 我的博客:http://blog.itpub.net/26736162/abstract/1/
● 微信公众号:xiaomaimiaolhr,二维码如下:
● 小麦苗的微信二维码如下所示,加我时请备注相关信息:
● 我的微店地址:https://weidian.com/s/793741433?wfr=c&ifr=shopdetail
● 出版的数据库类丛书:http://blog.itpub.net/26736162/viewspace-2142121/
● 博客链接:http://blog.itpub.net/26736162/abstract/1/
● 小麦苗课堂资料(视频+讲课资料):https://share.weiyun.com/5fAdN5m
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-06-01 06:00 ~ 2018-06-31 24:00 在魔都完成
● 最新修改时间:2018-06-01 06:00 ~ 2018-06-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 《DBA笔试面试宝典》读者群 小麦苗的微店
.............................................................................................................................................
![]()
![]()
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2155652/,如需转载,请注明出处,否则将追究法律责任。