Oracle 11g Express error: ORA-12505, TNS: listener does not currently know of SID given in connect descriptor

故事扮演 提交于 2019-12-12 01:12:13

问题


I am facing problem with Oracle 11g Express hosted on Linux Centos 6.4. This server is relocated from one place to another, this relocation changes the IP of server. We have changed the IP in tnsname.ora and listerner.ora files. After these changes when we are trying to connect to database instance from server we are getting error “Connected to idle instance”. If we are trying it to connect from client using SQL developer we are getting error “Status : Failure -Test failed: Listener refused the connection with the following error: ORA-12505, TNS: listener does not currently know of SID given in connect descriptor”.

We have restarted this server and database multiple time (through option Start and Stop database under Oracle menu) multiple time, but still we are getting the same error.

Request you to please help to resolve this issue.


回答1:


The local connection via sqlplus user/passwd (as opposed to sqlplus user/passwd@TNSALIAS) is not impacted by IP address or by contents of tnsnames.ora. It also does not require a listener at all, the listener could be stopped or not defined at all in listener.ora. In other words, you did something wrong here.

My guess is that you are mislead into thinking that you've started the database, when in fact it is not started. Check if you have a process called ora_MYORACLE_pmon.

Also the file tnsname.ora is irrelevant; Oracle only checks tnsnames.ora.




回答2:


we resolved this issue, actually we were missing server address in some files it was still referring old address.

initXE.ora missing local listener parameter, then we added this parameter to it and it start working.

May be this is not the generalise solution but it work in our case.




回答3:


This behavior is expected if the listener was originally configured with an ALTER SYSTEM command like ALTER SYSTEM SET LOCAL_LISTENER=''; and that command specified the SCOPE=MEMORY option or if the SCOPE is left to default and the database was started with a pfile.

To fix it, reissue all ALTER SYSTEM commands from before the restart. Or at least one that identifies the LOCAL_LISTENER. And set SCOPE=BOTH.



来源:https://stackoverflow.com/questions/20679921/oracle-11g-express-error-ora-12505-tns-listener-does-not-currently-know-of-si

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!