Monday, January 15, 2007

I want to change IP Address on ORACLE CLUSTER

My Problem ... I must change from 6.9.23.32/255.255.255.240 to 6.9.17.227/255.255.255.240

So, I have to stop all nodes....

1. Stop Oracle Database, ASM , listener and Nodeapps on every nodes
# srvctl stop database -d DB
# srvctl stop ASM -n DB01
# srvctl stop ASM -n DB02
# srvctl stop ASM -n DB03
# srvctl stop ASM -n DB04
# srvctl stop listener -n DB01
# srvctl stop listener -n DB02
# srvctl stop listener -n DB03
# srvctl stop listener -n DB04
# srvctl stop nodeapps -n DB01
# srvctl stop nodeapps -n DB02
# srvctl stop nodeapps -n DB03
# srvctl stop nodeapps -n DB04

2. Change hostname /etc/hosts on every nodes

3. Change IP Address on every nodes

4. Login to root user and export ORACLE_HOME

5. Change IP Network on Cluster and VIP

#/oracle/product/10.2.0/crs/bin/oifcfg getif
bond0 6.9.23.32 global public
bond1 192.168.2.0 global cluster_interconnect

#oifcfg delif -global bond0
#oifcfg setif -global bond0/6.9.17.224:Public

- Change VIPs on nodes (example 4 nodes)

#srvctl modify nodeapps -n DB01 -A 6.9.17.227/255.255.255.240/bond0
#srvctl modify nodeapps -n DB02 -A 6.9.17.229/255.255.255.240/bond0
#srvctl modify nodeapps -n DB03 -A 6.9.17.231/255.255.255.240/bond0
#srvctl modify nodeapps -n DB04 -A 6.9.17.233/255.255.255.240/bond0

remark:
oifcfg setif {-node [nodename] | -global} { [if_name]/[subnet]:[if_type]}...

Be careful "subnet" not mean NETMASK ... It mean Network
Example:
ip address: 192.168.1.1 netmask 255.255.255.0
So, network = 192.168.1.0
#oifcfg setif -global bond1/192.168.1.0:cluster_interconnect



4 comments:

Marco V. said...

Hi Surachart,
why do you issue the last 4 commands (I mean... srvctl modify nodeapps -n -A) ?
Aren't they issued to modify VIP addresses ?

Bye,
Marco

Surachart Opun said...

I have 4 nodes on RAC.

So I used 4 last command.
to change every nodes on RAC.

Actually This issue used to change IP address + VIP on RAC.

old IP Sub to new IP Sub.

Unknown said...

Hi Surachart,

Can you give me headsup on the same for standalone database.
How to change the IP for standalone database.

Hoping a reply from your end

Surachart Opun said...

Raghuveergupta Cittanuri,

Please check Listener & TNS configuration and initialization parameter, example about LISTER*

You have to check /etc/hosts file as well