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:
Any help is apreciated. Thanks in advance!
Best Answer
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!
PS: We still have no ideia why/how it was working before, since the file updated date dates from about 2 weeks ago.