ORACLE_HOSTNAME for existing database
442078Mar 5 2010 — edited Apr 1 2010We did a fresh install of oracle 10.2.0.4 database. The database is up and running fine.
Recently we decided that we will use virtual hostname and so we configured a new ethernet card and IP address.
The problem is we set ORACLE_HOSTNAME to the virtual hostname in the environment variable and started the database. Still the database is using the old hostname.
SQL> select instance_name,host_name from v$instance;
INSTANCE_NAME HOST_NAME
---------------- ----------
PRODDB server01
SQL>
Added the IP address and the virtual hostname to the /etc/hosts file.
$export ORACLE_HOSTNAME=prodserver
Restarted the database.
SQL> select instance_name,host_name from v$instance;
INSTANCE_NAME HOST_NAME
---------------- ----------
PRODDB server01
SQL>
After the restart host_name is still the actual hostname
How to overcome this situation ?