kettle 链接oracle12c

2023-02-14,,

jdbc连接cdb数据库时,url兼容以下2种模式:

"jdbc:oracle:thin:@192.168.75.131:1521:oracle12c"

"jdbc:oracle:thin:@192.168.75.131:1521/oracle12c"

jdbc连接pdb数据库时url必须使用:" jdbc:oracle:thin:@192.168.75.131:1521/oracle12c"格式,
若使用传统格式" jdbc:oracle:thin:@192.168.75.131:1521:oracle12c"则会报一下错误:

java.sql.SQLException: Listenerrefused the connection with the following error:

ORA-12505, TNS:listener does notcurrently know of SID given in connect descriptor
Kettle 如果用Native(JDBC)方式连接Oracle,默认是第一种方式,是无法连接上的
故我们采用JNDI方式连接:
打开Keetle安装目录以下找到jdbc.properties文件,并输入以下内容:

kettle/type=javax.sql.DataSource
kettle/driver=oracle.jdbc.driver.OracleDriver
kettle/url=jdbc:oracle:thin:@127.0.0.1:1535/szorcl
kettle/user=ps_ztb
kettle/password=ps_ztb

kettle链接设置:

kettle 链接oracle12c的相关教程结束。

《kettle 链接oracle12c.doc》

下载本文的Word格式文档,以方便收藏与打印。