The script (/usr/local/bin/sethostname) to be run by cron:
· Login as root.
· vi /usr/local/bin/sethostname
· Place the following line in the /usr/local/bin/sethostname
echo desired_hostname > /proc/sys/kernel/hostname
· chmod 755 /usr/local/bin/sethostname
· Issue crontab –e and place the following line in the cron tab and save.
# SET HOSTNAME
* * * * * /usr/local/bin/sethostname >> /usr/local/bin/sethostname.log 2>&1
· The desired_hostname and IP entry needs to be in the /etc/hosts file
desired_hostname = Hostname of your choice.
This is work around to this known limitation: http://taliphakanozturken.wordpress.com/2011/12/31/oem-configuration-when-the-database-host-name-or-ip-address-changes/