开发反馈使用kettle工具连pdb连不上,报错如下:

 

Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
...
	at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:588)
	at org.pentaho.di.core.database.Database.normalConnect(Database.java:461)
	... 48 more
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

看这个报错可以猜测jdbc的连接串是使用sid去连的,让开发尝试使用sid去连,确实能连上。但由于pdb使用的是service_name,还需要找到使用service_name连接oracle数据库方法。

查询文档发现方法如下:

  • 不需要填主机名
  • 数据库名写如下连接字符串:(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = IP地址)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = 服务名)))
  • 端口号填:-1

如图:

文末吐槽一下,真不科学的连接方法。。。

参考

kettle设计器连接oracle RAC时的连接字符串_4color的博客-CSDN博客_kettle oracle集群

BMC Community

kettle --- 02连接oracle - 简书

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐