Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

3 Answers

up vote 4 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
add comment

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

share|improve this answer
add comment

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
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.