Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When I o an Oracle test installation on a Windows server accepting mostly the defaults, I end up with a listener.ora like

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

THat never seems to enable the listener, to accept requests from remote machines. I have to add a line with the actual IP address or DNS-name of the server. Giving something like

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 169.254.239.75)(PORT = 1521))
    )
  )

From Technet I know, that Windows has ways to resolve localhost others than reading from etc/hosts. And typing

ping localhost

shows this.

Each time I do a test installation I have to manually edit listener.ora and tnsnames.ora files and replace the localhost by actual data.

Is the problem to resolve localhost caused by having more than one network adapters?

My normal test configuration is a virtual machine with one adapter connected to the internal network and another connected to the internet via NAT.

Is localhost in those files thought as template to be replaced by a real dns-names or IP-adresses or are there true server-configurations, where the files can be used as generated by DBCA?

share|improve this question
    
localhost is normally bound to 127.0.0.1, i.e., an address of the loopback interface. What do you mean with "Windows has ways to resolve localhost others than reading from etc/hosts"? What does your ping command show? Doesn't it use 127.0.0.1? –  eppesuig Jan 2 '13 at 12:59
add comment

2 Answers

By definition localhost traffic is never supposed to enter or leave the server. It is a name for the addresses 127.0.0.1 and ::1. It will be bound to a loopback device. localhost is useful to allow IP access to services running on the local machine.

You likely want to use the host name of your virtual server rather than localhost. This should resolve to you network interfaces.

share|improve this answer
add comment

You may enable Microsoft loop back adapter and set to static IP for this. Steps are mentioned in installation guide.

share|improve this answer
    
Could you expand your answer a bit? What does a loop back adapter do? Where can a user find more info on it? What can I do with it? –  trygvis Jan 2 '13 at 10:30
add comment

Your Answer

 
discard

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.