I'm having a problem with an Oracle database. Yesterday everything was working fine, I had an application that was using the database and there was no problem. At the end of the day I installed MySQL on the same server (I don't think it can be related but anyway..) and had to restart the server. Today when I was using my application to access the Oracle database I had a connection error:

Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Then I went to the server. All the services are up and the database is down.

When I try to login normally, I get an error saying that Oracle is not available, and can only connect as sysdba. Then when I try to start the database up I get the following errors:

SQL Plus console display

Any help is apreciated. Thanks in advance!

2 Answers 2


Well, my teammate found the answer to the problem.

He changed some details in the file 'tnsnames.ora' at ORACLE_HOME\NETWORK\ADMIN. He just replaced “hostname” by “localhost”.

WP5 =
(ADDRESS = (PROTOCOL = TCP)(HOST = <b>localhost</b>)(PORT = 1521))

LISTENER_WP5 =<br> (ADDRESS = (PROTOCOL = TCP)(HOST = <b>localhost</b>)(PORT = 1521))

A new startup (without leaving sqlplus) made it work!

Oracle success console message

PS: We still have no ideia why/how it was working before, since the file updated date dates from about 2 weeks ago.

  • fact is that de db won't crash when you make changes to your tnsnames when it is already running, it could refuse to start indeed
    – Munchi
    Commented May 15, 2014 at 8:12

Did you set the ORACLE_SID? I think the problem is there

  • This should be a comment. Unless you are sure it is the correct answer to the problem. Commented May 13, 2014 at 17:59
  • Yes, I had the ORACLE_SID and ORACLE_HOME set. Commented May 14, 2014 at 8:27
  • Ok sorry, I'm new here and don't know the exact rules to post!
    – eliatou
    Commented May 14, 2014 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.