Chat2DB连接oracle报:TNS:listener does not currently know of SID given in connect descriptor解决方式

报错原因:通过报错内容 “TNS:listener does not currently know of SID given in connect descriptor”,可以分析出,SID 不正确;或使用了服务名而不是SID。jdbc连接数据库的时候,使用数据库的 sid_name,而不是数据库的 services_name(服务名)

SID 可通过下面 sql 查询得到:

select INSTANCE_NAME from v$instance;

Chat2DB连接oracle报:TNS:listener does not currently know of SID given in connect descriptor解决方式_第1张图片

我的SID和服务名不一样

Chat2DB连接oracle报:TNS:listener does not currently know of SID given in connect descriptor解决方式_第2张图片

你可能感兴趣的:(oracle,数据库)