Search code examples
oraclelocalhosttnssqltools

Only localhost doesn't work in Oracle


I installed Oracle 11g R2 on my computer and I connected with my localhost (by SQLTools) and external hosts. Everything worked good. I turned off and turned on my computer and I can't connect to my localhost (ORA-12541). External hosts work ok still. I uninstalled Oracle from my computer and I installed again. The same situation - turn off, turn on and doesn't work. I think I have a good configuration in Oracle Net Manager like below:

enter image description here

and I have well-generated file listener.ora like below:

enter image description here

I have turned on all services too. I have well-generated sqlnet.ora and tnsnames.ora files and paths. I started listener by lsnrctl start but when I typed lsnrctl status I have an unknown error.

I studied many materials and already I don't have any new ideas.


Solution

  • I resolved my problems. I had to set Oracle to listens on all ip addresses. My localhost didn't work despite that Oracle listens only to localhost connections default - it bluffed me. When I set up Oracle to listens on all ip addresses like below:

    enter image description here

    and I reloaded my services - everything is good. I had to set all services Automatic like below:

    enter image description here

    When I had my configuration as above (one address for localhost, and one for external host) and I reloaded services, everything was good too! But when I restarted computer - localhost didn't work. I checked services and when I had mine configuration - listener didn't start, I have no idea why!

    enter image description here

    Conclusion:

    When I have one address (0.0.0.0) and I am reseting my computer - all services are turning on.

    When I have my own configuration and I am reseting my computer - listener don't want turn on automatically (I don't know why)!

    Now it works!