oracle SQL Developer 的 ORA 12505 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16671798/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:40:51  来源:igfitidea点击:

ORA 12505 error for SQL Developer

oracleoracle11glistener

提问by user2405778

I have recently ran into a problem when trying to connect to my Database. The error is stating that it cant find the listener.

我最近在尝试连接到我的数据库时遇到了问题。错误表明它无法找到侦听器。

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

I read to post whats in the listener.ora and tnsnames.ora but when I try to open these files via windows explorer it tells me to choose a program to open it with, and then it doesnt open.

我阅读了在 listener.ora 和 tnsnames.ora 中发布的内容,但是当我尝试通过 Windows 资源管理器打开这些文件时,它告诉我选择一个程序来打开它,然后它没有打开。

Can someone help me with this problem so I can get back to practicing coding please?

有人可以帮我解决这个问题,这样我就可以回去练习编码了吗?

回答by ExcessOperatorHeadspace

The command to view listener information in Windows is lsnrctl. Open a DOS command prompt on the server, not client.

Windows中查看监听器信息的命令是lsnrctl。在服务器而不是客户端上打开 DOS 命令提示符。

lsnrctl status

View the other commands by

查看其他命令

lsnrctl help

Also, the tnsnames.ora and listener.ora files are text files. You can open those in notepad. The default location for the tnsnames.ora file on the client is:

此外,tnsnames.ora 和 listener.ora 文件是文本文件。您可以在记事本中打开它们。客户端上 tnsnames.ora 文件的默认位置是:

C:\oracle\product.2.0\client_1\Network\Admin

The default location for the listener.ora file on the server is:

服务器上 listener.ora 文件的默认位置是:

ORACLE_HOME\network\admin