orale用户,只在一个节点操作即可:
[oracle@node1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Mon Jul 3 15:17:25 2017 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.98) (PORT = 1521))' sid='iesdb1'; System altered. SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.99) (PORT = 1521))' sid='iesdb2'; System altered. SQL> 修改完后,查看local_listener的IP地址为:
[oracle@node2 ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.5.0 - Production on Mon Jul 3 15:19:10 2017 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. SQL> conn sys@iesdb1 as sysdba Enter password: Connected. SQL> show parameter local_listener; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ local_listener string (ADDRESS = (PROTOCOL = TCP)(HO ST = 192.168.56.98) (PORT = 15 21)) SQL> conn sys/inspur@iesdb2 as sysdba Connected. SQL> show parameter local_listener; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ local_listener string (ADDRESS = (PROTOCOL = TCP)(HO ST = 192.168.56.99) (PORT = 15 21))至此,oracle集群恢复完毕。
5. 修改private ip这里补充下修改private ip的方法。
可以使用oracle用户来修改private ip,操作方法如下:
修改心跳网段为10.10.10.0
oracle用户登录,只在一个节点操作即可:
# 查看当前的IP信息 [oracle@node1 ~]$ oifcfg getif eth0 192.168.56.0 global public eth1 10.1.1.0 global cluster_interconnect # 增加10.10.10.0网段为心跳网段 [oracle@node1 ~]$ oifcfg setif -global eth1/10.10.10.0:cluster_interconnect [oracle@node1 ~]$ oifcfg getif eth0 192.168.56.0 global public eth1 10.1.1.0 global cluster_interconnect eth1 10.10.10.0 global cluster_interconnect # 删除原来的心跳网段 [oracle@node1 ~]$ oifcfg delif -global eth1/10.1.1.0 [oracle@node1 ~]$ oifcfg getif eth0 192.168.56.0 global public eth1 10.10.10.0 global cluster_interconnect # oifcfg帮助信息 [oracle@node1 ~]$ oifcfg -help Name: oifcfg - Oracle Interface Configuration Tool. Usage: oifcfg iflist [-p [-n]] oifcfg setif {-node <nodename> | -global} {<if_name>/<subnet>:<if_type>}... oifcfg getif [-node <nodename> | -global] [ -if <if_name>[/<subnet>] [-type <if_type>] ] oifcfg delif [-node <nodename> | -global] [<if_name>[/<subnet>]] oifcfg [-help] <nodename> - name of the host, as known to a communications network <if_name> - name by which the interface is configured in the system <subnet> - subnet address of the interface <if_type> - type of the interface { cluster_interconnect | public | storage }
关闭CRS