Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a quick solution for the following problem:

I have one virtual machines (vmware) I want to be able to give to colleagues (copy of the vm). I installed on the machine Oracle XE database and I want each copied VM to be renamed (the machine name) (like vm-dev-01, vm-dev-02 and so on).

The big problem is that Oracle does not support renaming the host name after installation as it use it for some services.

I want to know if there is a quick step-by-step procedure or a batch script which can be applied after a host rename.

I know that reinstalling the software fix it, but I would prefer not to do that each time I copy my VM's.

share|improve this question

migrated from Mar 3 '11 at 3:07

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

The only thing I can think of that might have the hostname configured in it is the listener. But since the listener and the database will be running on the same host, you can always configure the listener to use the instance-hostname

share|improve this answer
In addition I give the two file which needs to be modified: path = {oraclexe-HOME}\app\oracle\product\10.2.0\server\NETWORK\ADMIN; tnsnames.ora and listener.ora; I prefered to put the real host name otherwise I guess it is not remotely accessible. – ruffp Mar 14 '11 at 14:35

You should be able to change the hostname with impunity as long as you keep the old hostname in /etc/hosts. E.G. oldname newname localhost.localdomain localhost
::1 oldname newname localhost6.localdomain6 localhost6

share|improve this answer
Hello, I knew that but it does not look not very clean solution. I would prefer to change the Oracle files who have the host hardcoded and change it to localhost ( use it only internally) – ruffp Mar 3 '11 at 7:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.