Oracle连接报错:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Oracle数据库TNS配置如下:

Oracle连接报错:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

 

 springBoot项目中的application.properties数据库配置如下:

Oracle连接报错:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

 

 

注意server_name不一定是TNS配置中的服务名称,需要使用数据库的sid_name

查询数据库的sid_name

SELECT INSTANCE_NAME FROM v$instance;

Oracle连接报错:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

 

 将项目中配置的数据库服务名称改为我们查询出来的sid_name

 

Oracle连接报错:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

上一篇:数据库补充一些基本的知识点~~


下一篇:Linux下安装MongoDB及安装问题