1

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!

migrated from stackoverflow.com May 13 '14 at 13:43

This question came from our site for professional and enthusiast programmers.

1

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 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <b>localhost</b>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WP5)
)
)

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 May 15 '14 at 8:12
0

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. – ypercubeᵀᴹ May 13 '14 at 17:59
  • Yes, I had the ORACLE_SID and ORACLE_HOME set. – RageAgainstTheMachine May 14 '14 at 8:27
  • Ok sorry, I'm new here and don't know the exact rules to post! – eliatou May 14 '14 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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