i’ve never play with informix before. but today i have to help my friend to change the ip of the informix server to comply our new network regulation. the informix server is currently listening on ip 192.168.11.12, the same ip as the eth0.
we have to change the eth0 ip to 172.16.10.12 according to the new regulation. as the ussual way to do the change, i edit what’s needed in file /etc/sysconfig/network-scripts/ifcfg-eth0 and restart the network service. ip changes work fine.
to make the informix listen on the new ip, i also restart the informix services. but it doesn’t work as expected….:(
i try google for some times to find answers about changing ip for informix server but no good result comes up. so i try look for some documentation in informix home dir and finally find some clue in file /home/informix/release/en_us/0333/SE_7.2. it has something to do with sqlhosts file. so i try:
$ locate sqlhosts
result is /home/informix/etc/sqlhosts, then i look into the file with vi and the answer was there.
here’s the contain of the file :
#demo_on onipcshm on_hostname on_servername
#demo_se seipcpip se_hostname sqlexec
dbserver sesoctcp db.domain.co.id sqlexec
then i do :
$ dig db.domain.co.id
the answer is 192.168.11.12. so i add this line in /etc/hosts file to tell informix to use the new ip
then i tell the server to reboot. informix is now listening on the new ip and works fine as it was with the old ip.