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.
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).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"
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:
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'