Search code examples
oracleoracle-sqldeveloperlistener

Oracle SQL Developer 12505 error since change of network


since I changed my standard landline connection with a wireless one via a 3g hotspot I cannot open my db in Sql Developer. I get the error : "Listener refused the connection with the following error: ORA-12505 TNS:listener does not currently know of SID given in the connect descriptor" I changed the hostname values in the listener.ora and tnsnames.ora files and I think it has something to do with the hostname given there. Also I have 2 copies of listener.ora and tnsnames.ora files. 1 copy in the admin folder and another in the sample folder it contains. Should I modify all files?


Solution

  • Files in the sample folder are just that - samples. Oracle never actually uses them. The error you are getting is definitive proof that your request actually reached a listener. So I'd expect that you changed something besides just your underlying network. You said you changed your hostname in tnsnames.ora. Why? If you changed it to some other machine, one that obviously happens to have an oracle listener (else you could not have gotten ORA-12505), then I would not expect that listener to know about about your database, which resides on the host that was originally specified in your tnsnames, before you changed it. And why change HOSTNAME in your listener.ora file? Changing from a "landline" to a wifi connection does not change the names of the servers or the databases, or anything else.