使用数据库连接工具报此错误 ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

使用Oracle数据库连接工具报此错误
Connection to @localhost failed.
[66000][12505] Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
翻译为:
与@localhost的连接失败。
[66000][12505]侦听器拒绝连接,出现以下错误:
ORA-12505,TNS:侦听器当前不知道连接描述符中给定的SID
错误很明确SID问题:
首先通过cmd窗口登入到orcale数据库

select INSTANCE_NAME from v$instance;

运行此语句,查询SID名称:
在这里插入图片描述
然后将SID框中值改为orcl
在这里插入图片描述
然后输入用户名和密码就可以连接了(这里我使用的是idea自带的数据库链接工具,)
在这里插入图片描述

发布了45 篇原创文章 · 获赞 47 · 访问量 1691

猜你喜欢

转载自blog.csdn.net/qq_44784185/article/details/104086481