5

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.

рüффп
  • 620
  • 1
  • 11
  • 25

3 Answers3

4

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 127.0.0.1

  • 2
    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. – рüффп Mar 14 '11 at 14:35
0

You should be able to change the hostname with impunity as long as you keep the old hostname in /etc/hosts. E.G.

127.0.0.1 oldname newname localhost.localdomain localhost
::1 oldname newname localhost6.localdomain6 localhost6

sciurus
  • 12,678
  • 2
  • 31
  • 49
  • 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) – рüффп Mar 03 '11 at 07:52
0

All you have to do to fix it is rename listener.ora and restart see explanation here

AndrewT
  • 101
  • 3