首页 > 代码库 > oracle10g rac 零宕机修改public ip&vip
oracle10g rac 零宕机修改public ip&vip
先修改1节点的
1.修改ocr中public的信息
[oracle@rac1 ~]$ oifcfg delif -global eth0[oracle@rac1 ~]$ oifcfg setif -global eth0/172.168.1.0:public[oracle@rac1 ~]$ oifcfg getifeth0 172.168.1.0 global publiceth1 192.168.1.0 global cluster_interconnect
2. 停止1节点nodeapps资源
[oracle@rac1 ~]$ srvctl stop nodeapps -n rac1
3.修改主机ip
[oracle@rac1 ~]$ oifcfg iflisteth0 172.168.10.0eth1 192.168.1.0[root@rac1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
修改/etc/hosts文件中1节点的public ip和vip
[root@rac1 ~]# vi /etc/hosts#public ip192.168.0.10 --> 192.168.1.10#vip192.168.1.20 --> 192.168.1.20[root@rac2 ~]# vi /etc/hosts#public ip192.168.0.10 --> 192.168.1.10#vip192.168.1.20 --> 192.168.1.20
重启网络服务
[root@rac1 ~]# service network restart[oracle@rac1 ~]$ oifcfg iflisteth0 172.168.1.0eth1 192.168.1.0
4. 修改vip
[oracle@rac1 ~]$ su Password: [root@rac1 oracle]# srvctl modify nodeapps -n rac1 -A 172.168.1.20/255.255.255.0/eth0
5. 修改监听文件
$ vi $ORACLE_HOME/network/admin/listener.ora
6. 启动nodeapps资源
[oracle@rac1 ~]$ srvctl start nodeapps -n rac1rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 01-SEP-2014 17:13:26rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:Copyright (c) 1991, 2010, Oracle. All rights reserved.rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:Starting /oracle/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:TNSLSNR for Linux: Version 10.2.0.5.0 - Productionrac1:ora.rac1.LISTENER_RAC1.lsnr:System parameter file is /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.orarac1:ora.rac1.LISTENER_RAC1.lsnr:Log messages written to /oracle/app/oracle/product/10.2.0/db_1/network/log/listener_rac1.lograc1:ora.rac1.LISTENER_RAC1.lsnr:Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.21)(PORT=1521)(IP=FIRST)))rac1:ora.rac1.LISTENER_RAC1.lsnr:TNS-12545: Connect failed because target host or object does not existrac1:ora.rac1.LISTENER_RAC1.lsnr: TNS-12560: TNS:protocol adapter errorrac1:ora.rac1.LISTENER_RAC1.lsnr: TNS-00515: Connect failed because target host or object does not existrac1:ora.rac1.LISTENER_RAC1.lsnr: Linux Error: 99: Cannot assign requested addressrac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:Listener failed to start. See the error message(s) above...rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 01-SEP-2014 17:13:29rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:Copyright (c) 1991, 2010, Oracle. All rights reserved.rac1:ora.rac1.LISTENER_RAC1.lsnr:rac1:ora.rac1.LISTENER_RAC1.lsnr:Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.21)(PORT=1521)(IP=FIRST)))rac1:ora.rac1.LISTENER_RAC1.lsnr:TNS-12560: TNS:protocol adapter errorrac1:ora.rac1.LISTENER_RAC1.lsnr: TNS-00530: Protocol adapter errorrac1:ora.rac1.LISTENER_RAC1.lsnr: Linux Error: 113: No route to hostrac1:ora.rac1.LISTENER_RAC1.lsnr:Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.168.1.11)(PORT=1521)(IP=FIRST)))rac1:ora.rac1.LISTENER_RAC1.lsnr:TNS-12541: TNS:no listenerrac1:ora.rac1.LISTENER_RAC1.lsnr: TNS-12560: TNS:protocol adapter errorrac1:ora.rac1.LISTENER_RAC1.lsnr: TNS-00511: No listenerrac1:ora.rac1.LISTENER_RAC1.lsnr: Linux Error: 111: Connection refusedCRS-0215: Could not start resource ‘ora.rac1.LISTENER_RAC1.lsnr‘.
监听资源没有起来,可以看到其他资源均正常启动
[oracle@rac1 admin]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora....SM1.asm application ONLINE ONLINE rac1 ora....C1.lsnr application ONLINE OFFLINE ora.rac1.gsd application ONLINE ONLINE rac1 ora.rac1.ons application ONLINE ONLINE rac1 ora.rac1.vip application ONLINE ONLINE rac1 ora....SM2.asm application ONLINE ONLINE rac2 ora....C2.lsnr application ONLINE ONLINE rac2 ora.rac2.gsd application ONLINE ONLINE rac2 ora.rac2.ons application ONLINE ONLINE rac2 ora.rac2.vip application ONLINE ONLINE rac2 ora.test.db application ONLINE ONLINE rac1 ora....t1.inst application ONLINE ONLINE rac1 ora....t2.inst application ONLINE ONLINE rac2
7. 手动启动监听
[oracle@rac1 admin]$ lsnrctl startLSNRCTL for Linux: Version 10.2.0.5.0 - Production on 01-SEP-2014 17:19:50Copyright (c) 1991, 2010, Oracle. All rights reserved.Starting /oracle/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 10.2.0.5.0 - ProductionSystem parameter file is /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.oraLog messages written to /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.logListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 10.2.0.5.0 - ProductionStart Date 01-SEP-2014 17:19:50Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.oraListener Log File /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.logListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1)(PORT=1521)))The listener supports no servicesThe command completed successfully
8. 动态监听注册
[oracle@rac1 admin]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.5.0 - Production on Mon Sep 1 17:20:06 2014Copyright (c) 1982, 2010, Oracle. All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing optionsSQL> alter system register;System altered.
9. 启动监听资源
[oracle@rac1 ~]$ crsctl start resources ora.rac2.LISTENER_RAC2.lsnrStarting resources.Successfully started CRS resources
10. 再次查看状态,已全部启动
[oracle@rac1 ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora....SM1.asm application ONLINE ONLINE rac1 ora....C1.lsnr application ONLINE ONLINE rac1ora.rac1.gsd application ONLINE ONLINE rac1 ora.rac1.ons application ONLINE ONLINE rac1 ora.rac1.vip application ONLINE ONLINE rac1 ora....SM2.asm application ONLINE ONLINE rac2 ora....C2.lsnr application ONLINE ONLINE rac2 ora.rac2.gsd application ONLINE ONLINE rac2 ora.rac2.ons application ONLINE ONLINE rac2 ora.rac2.vip application ONLINE ONLINE rac2 ora.test.db application ONLINE ONLINE rac1 ora....t1.inst application ONLINE ONLINE rac1 ora....t2.inst application ONLINE ONLINE rac2
接下来修改2节点,步骤同修改1节点
oracle10g rac 零宕机修改public ip&vip
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。