Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 can connect to my oracle database using localhost:1521. However, connecting to the IP address does not work.

I'm trying to do this because I am trying to connect to my database using another machine, but even the same machine cannot connect to itself using it's own IP Address.

Note: Oracle Database 11g and Windows 7.

share|improve this question
See if there is anything listening on the standard Oracle Database port: sudo netstat --tcp --udp --listening --program | grep 1521 – Wesley Apr 26 '12 at 3:25
up vote 6 down vote accepted

You need to enable the instance listener to be listening on an IP address, not just localhost. Go to the Net Services Administration page on the Oracle Enterprise Manager web interface. Edit the listener (LISTENER_localhost) and add a listener and select to use the IP address of the instance. Keep port 1521 as per default. You will be asked if you want to restart the service. Please do so. Then you should be able to connect from your host (or any other machine for that matter).

share|improve this answer
Thanks! I tried to edit the listener.ora by hand and it was terrible. But the Net Manager was quite easy. However, I used the Windows program, not the web application since I didn't know the password for it (as I'm writing this, it sounds like a joke, but I'm serious...). – Thomas Uhrig Dec 2 '14 at 14:18

You have to make sure that the listener is using You can check this on Windows with: netstat -an -p tcp |find ":1521"

share|improve this answer
Its listening on port 1521, but when I connect it says: An error occurred while establishing the connection: Long Message: The Network Adapter could not establish the connection Details: Type: java.sql.SQLException Error Code: 20 SQL State: 61000 – digz6666 Jul 18 '14 at 5:37

I had this problem after doing a database software only install. I found I had to open a port on the server in question and also the listener wasnt running to start with. To get it going I just went into lsnrctl (command line) and used the command start.

Because the listener had been started after the instance, the instance had missed its chance to register automatically. To fix this I just restarted the instance.

This can be done by using the sqlplus command line. You will need to login as a user with SYSDBA priveledges (eg system) syntax:

sqlplus name/pass as SYSDBA

then run 'shutdown' and wait for it to finish. then run 'startup' and wait for it to finish.

fingers crossed you should now have an instance registered with the listener and the listener listening on an open port.

To check that the instance is registered with the listener you can go back into lsnrctl and run the command 'status'. if it hasnt worked you'll see the message 'The listener supports no services'

share|improve this answer

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.