停止数据库:
[grid@yq ~]$ srvctl stop db -d orcl
[grid@yq ~]$ srvctl stop db -d orcl
查看ip信息
#public ip
192.168.56.120 lzl eth0
192.168.56.123 yq eth0
#virtual ip
192.168.56.121 lzl-vip
192.168.56.124 yq-vip
#private ip
192.168.0.110 lzl-priv
192.168.0.111 yq-priv
#scan ip
192.168.56.125 rac-scan
#public ip
192.168.56.120 lzl eth0
192.168.56.123 yq eth0
#virtual ip
192.168.56.121 lzl-vip
192.168.56.124 yq-vip
#private ip
192.168.0.110 lzl-priv
192.168.0.111 yq-priv
#scan ip
192.168.56.125 rac-scan
停掉集群
[root@lzl ~]# /u01/11.2.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'lzl'
CRS-2673: Attempting to stop 'ora.crsd' on 'lzl'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'lzl'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'lzl'
CRS-2672: Attempting to start 'ora.net1.network' on 'yq'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'lzl'
CRS-2673: Attempting to stop 'ora.oc4j' on 'lzl'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'lzl'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'lzl'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'lzl'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'lzl' succeeded
CRS-2676: Start of 'ora.net1.network' on 'yq' succeeded
CRS-2672: Attempting to start 'ora.ons' on 'yq'
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'lzl'
CRS-2673: Attempting to stop 'ora.lzl.vip' on 'lzl'
CRS-2673: Attempting to stop 'ora.cvu' on 'lzl'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'lzl' succeeded
CRS-2677: Stop of 'ora.cvu' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'yq'
CRS-2676: Start of 'ora.ons' on 'yq' succeeded
CRS-2676: Start of 'ora.cvu' on 'yq' succeeded
CRS-2677: Stop of 'ora.lzl.vip' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.lzl.vip' on 'yq'
CRS-2677: Stop of 'ora.scan1.vip' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'yq'
CRS-2677: Stop of 'ora.registry.acfs' on 'lzl' succeeded
CRS-2676: Start of 'ora.lzl.vip' on 'yq' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'yq' succeeded
CRS-2673: Attempting to stop 'ora.yq.vip' on 'lzl'
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'yq'
CRS-2677: Stop of 'ora.yq.vip' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.yq.vip' on 'yq'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'yq' succeeded
CRS-2676: Start of 'ora.yq.vip' on 'yq' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'yq'
CRS-2677: Stop of 'ora.DATADG.dg' on 'lzl' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'yq' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'lzl'
CRS-2677: Stop of 'ora.asm' on 'lzl' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'yq'
CRS-2674: Start of 'ora.oc4j' on 'yq' failed
CRS-2679: Attempting to clean 'ora.oc4j' on 'yq'
CRS-2681: Clean of 'ora.oc4j' on 'yq' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'lzl'
CRS-2677: Stop of 'ora.ons' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'lzl'
CRS-2677: Stop of 'ora.net1.network' on 'lzl' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'lzl' has completed
CRS-2677: Stop of 'ora.crsd' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'lzl'
CRS-2673: Attempting to stop 'ora.crf' on 'lzl'
CRS-2673: Attempting to stop 'ora.ctssd' on 'lzl'
CRS-2673: Attempting to stop 'ora.evmd' on 'lzl'
CRS-2673: Attempting to stop 'ora.asm' on 'lzl'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'lzl'
CRS-2677: Stop of 'ora.crf' on 'lzl' succeeded
CRS-2677: Stop of 'ora.evmd' on 'lzl' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'lzl' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'lzl' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'lzl' succeeded
CRS-2677: Stop of 'ora.asm' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'lzl'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'lzl'
CRS-2677: Stop of 'ora.cssd' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'lzl'
CRS-2677: Stop of 'ora.gipcd' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'lzl'
CRS-2677: Stop of 'ora.gpnpd' on 'lzl' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'lzl' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@lzl ~]#
修改成以下的IP地址
#public ip
192.168.56.130 lzl eth0
192.168.56.133 yq eth0
#virtual ip
192.168.56.131 lzl-vip
192.168.56.134 yq-vip
#private ip
192.168.0.110 lzl-priv
192.168.0.111 yq-priv
#scan ip
192.168.56.125 rac-scan
[root@lzl ~]# /u01/11.2.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'lzl'
CRS-2673: Attempting to stop 'ora.crsd' on 'lzl'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'lzl'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'lzl'
CRS-2672: Attempting to start 'ora.net1.network' on 'yq'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'lzl'
CRS-2673: Attempting to stop 'ora.oc4j' on 'lzl'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'lzl'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'lzl'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'lzl'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'lzl' succeeded
CRS-2676: Start of 'ora.net1.network' on 'yq' succeeded
CRS-2672: Attempting to start 'ora.ons' on 'yq'
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'lzl'
CRS-2673: Attempting to stop 'ora.lzl.vip' on 'lzl'
CRS-2673: Attempting to stop 'ora.cvu' on 'lzl'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'lzl' succeeded
CRS-2677: Stop of 'ora.cvu' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'yq'
CRS-2676: Start of 'ora.ons' on 'yq' succeeded
CRS-2676: Start of 'ora.cvu' on 'yq' succeeded
CRS-2677: Stop of 'ora.lzl.vip' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.lzl.vip' on 'yq'
CRS-2677: Stop of 'ora.scan1.vip' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'yq'
CRS-2677: Stop of 'ora.registry.acfs' on 'lzl' succeeded
CRS-2676: Start of 'ora.lzl.vip' on 'yq' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'yq' succeeded
CRS-2673: Attempting to stop 'ora.yq.vip' on 'lzl'
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'yq'
CRS-2677: Stop of 'ora.yq.vip' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.yq.vip' on 'yq'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'yq' succeeded
CRS-2676: Start of 'ora.yq.vip' on 'yq' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'yq'
CRS-2677: Stop of 'ora.DATADG.dg' on 'lzl' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'yq' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'lzl'
CRS-2677: Stop of 'ora.asm' on 'lzl' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'lzl' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'yq'
CRS-2674: Start of 'ora.oc4j' on 'yq' failed
CRS-2679: Attempting to clean 'ora.oc4j' on 'yq'
CRS-2681: Clean of 'ora.oc4j' on 'yq' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'lzl'
CRS-2677: Stop of 'ora.ons' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'lzl'
CRS-2677: Stop of 'ora.net1.network' on 'lzl' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'lzl' has completed
CRS-2677: Stop of 'ora.crsd' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'lzl'
CRS-2673: Attempting to stop 'ora.crf' on 'lzl'
CRS-2673: Attempting to stop 'ora.ctssd' on 'lzl'
CRS-2673: Attempting to stop 'ora.evmd' on 'lzl'
CRS-2673: Attempting to stop 'ora.asm' on 'lzl'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'lzl'
CRS-2677: Stop of 'ora.crf' on 'lzl' succeeded
CRS-2677: Stop of 'ora.evmd' on 'lzl' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'lzl' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'lzl' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'lzl' succeeded
CRS-2677: Stop of 'ora.asm' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'lzl'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'lzl'
CRS-2677: Stop of 'ora.cssd' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'lzl'
CRS-2677: Stop of 'ora.gipcd' on 'lzl' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'lzl'
CRS-2677: Stop of 'ora.gpnpd' on 'lzl' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'lzl' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@lzl ~]#
修改成以下的IP地址
#public ip
192.168.56.130 lzl eth0
192.168.56.133 yq eth0
#virtual ip
192.168.56.131 lzl-vip
192.168.56.134 yq-vip
#private ip
192.168.0.110 lzl-priv
192.168.0.111 yq-priv
#scan ip
192.168.56.125 rac-scan
停掉集群(我是2个节点都做)
[root@lzl ~]# /u01/11.2.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@lzl ~]# /u01/11.2.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[grid@lzl ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4534: Cannot communicate with Event Manager
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4534: Cannot communicate with Event Manager
修改PUBLIC ip和VIP
[root@lzl bin]# ./oifcfg getif
eth0 192.168.56.0 global public
eth1 192.168.0.0 global cluster_interconnect
[root@lzl bin]# ./oifcfg delif -global eth0
[root@lzl bin]# ./oifcfg setif -global eth0/192.168.56.1:public
[root@lzl bin]#
[root@lzl bin]# ./oifcfg getif
eth1 192.168.0.0 global cluster_interconnect
eth0 192.168.56.1 global public
[root@lzl bin]# ./oifcfg setif -global eth0/192.168.56.0:public
[root@lzl bin]# ./oifcfg getif
eth1 192.168.0.0 global cluster_interconnect
eth0 192.168.56.1 global public
eth0 192.168.56.0 global public
[root@lzl bin]# ./oifcfg getif
eth0 192.168.56.0 global public
eth1 192.168.0.0 global cluster_interconnect
[root@lzl bin]# ./oifcfg delif -global eth0
[root@lzl bin]# ./oifcfg setif -global eth0/192.168.56.1:public
[root@lzl bin]#
[root@lzl bin]# ./oifcfg getif
eth1 192.168.0.0 global cluster_interconnect
eth0 192.168.56.1 global public
[root@lzl bin]# ./oifcfg setif -global eth0/192.168.56.0:public
[root@lzl bin]# ./oifcfg getif
eth1 192.168.0.0 global cluster_interconnect
eth0 192.168.56.1 global public
eth0 192.168.56.0 global public
定义VIP
[root@lzl bin]# ./srvctl config vip -n lzl
VIP exists: /lzl-vip/192.168.56.131/192.168.56.0/255.255.255.0/eth0, hosting node lzl
[root@lzl bin]# ./srvctl config vip -n lzl
VIP exists: /lzl-vip/192.168.56.131/192.168.56.0/255.255.255.0/eth0, hosting node lzl
[root@yq ~]# /u01/11.2.0/grid/bin/srvctl config vip -n yq
VIP exists: /yq-vip/192.168.56.134/192.168.56.0/255.255.255.0/eth0, hosting node yq
VIP exists: /yq-vip/192.168.56.134/192.168.56.0/255.255.255.0/eth0, hosting node yq
停止监听和vip并重设VIP
[root@yq bin]# ./srvctl stop listener -n yq
[root@yq bin]# ./srvctl stop vip -n yq
[root@yq bin]# ./srvctl modify nodeapps -n yq -A 192.168.56.134/255.255.255.0/eth0
[root@yq bin]# ./srvctl stop listener -n yq
[root@yq bin]# ./srvctl stop vip -n yq
[root@yq bin]# ./srvctl modify nodeapps -n yq -A 192.168.56.134/255.255.255.0/eth0
[root@lzl bin]# ./srvctl stop listener -n lzl
[root@lzl bin]# ./srvctl stop vip -n lzl
[root@lzl bin]# ./srvctl modify nodeapps -n lzl -A 192.168.56.131/255.255.255.0/eth0
[root@lzl bin]# ./srvctl stop vip -n lzl
[root@lzl bin]# ./srvctl modify nodeapps -n lzl -A 192.168.56.131/255.255.255.0/eth0
[root@yq bin]# ./srvctl config vip -n lzl
VIP exists: /lzl-vip/192.168.56.131/192.168.56.0/255.255.255.0/eth0, hosting node lzl
[root@yq bin]# ./srvctl config vip -n yq
VIP exists: /yq-vip/192.168.56.134/192.168.56.0/255.255.255.0/eth0, hosting node yq
[root@yq bin]#
VIP exists: /lzl-vip/192.168.56.131/192.168.56.0/255.255.255.0/eth0, hosting node lzl
[root@yq bin]# ./srvctl config vip -n yq
VIP exists: /yq-vip/192.168.56.134/192.168.56.0/255.255.255.0/eth0, hosting node yq
[root@yq bin]#
[root@lzl bin]# ./srvctl start vip -n lzl
[root@lzl bin]# ./srvctl start vip -n yq
[root@lzl bin]# ./srvctl start listener -n lzl
[root@lzl bin]# ./srvctl start listener -n yq
[root@lzl bin]# ./srvctl start database -d orcl
VIP已经自动注册
[oracle@lzl ~]$ sqlplus / as sysdba
[oracle@lzl ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 5 18:09:26 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
SQL>
SQL> show parameter local_listener
SQL>
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.56.131)(PORT=1521))
SQL> show parameter local_listener
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.56.131)(PORT=1521))
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.56.134)(PORT=1521))
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.56.134)(PORT=1521))
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31467250/viewspace-2140574/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31467250/viewspace-2140574/