Thursday, February 21, 2008

Changing IP and hostname in Application Server 10g

Because we moved our new OEM10gr2 server to the datacenter, the IP address and the hostname changed. When added to the datacenter I had to start all the services again, but first I had to change the opmn configuration. Instead of changing all the config files by hand, I noticed a shell script in the $OMS_HOME/chgip/scripts, called chgiphost.sh

This script changes all the config files and replaces the ip and hostname. It will ask you for the source and target ip/hostname...

Saved me some time...

6 comments:

Patrick said...

Good one

Marco Gralike said...

Mis je - Snik...

;-)

Unknown said...

./chgip/scripts/chgiphost.sh
echo -infra : To change the IP of Infrastructure Home
echo -mid : To change the Hostname/IP of the Mid-tier Home
echo -idm : To change hostname/IP of IM-only Home
echo -silent : To run in silent mode

--
Does the above imply that it doesn't work when you have an infra structure database you want to run on a different server? Because it only mentions that you can change the IP of the infrastructure...

Bas Klaassen said...

For the database, you change the listener configuration and the database spfile/init.ora

As far as I know, this is done manually. Also, you manually have to chance the hosts file. Make sure the new hosts file is used, otherwise the listener won't start :)

Mumonzan said...

I suppose that script exist from 10.1.1 or 10.1.2 ?
I have 10.1.0.2.0 and it doesn't exist both on RedHat and Win platform.

Robacle said...

Beware of chgiphost: it may make a few changes too many. On an infrastructure server the em-control will not find the LDAP server after chgiphost. This can be repaired by editing the targets.xml file in sysman/emd

On a Discoverer midtier similar problems may occur.