配置Kettle
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"格式,
若使用传统格式" :oracle:thin:@192.168.75.131:1521:ole12c"则会报一下错误:
java..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安装目录以下文件,并输入以下内容:
D:\Program Files\data-integration\simple-jndi\jdbc.properties kettle/type=javax.sql.DataSource
kettle/driver=oracle.jdbc.driver.OracleDriver
kettle/url=jdbc:oracle:thin:@localhost:1521/pdborcl
kettle/user=kettle
kettle/password=kettle
保存文件后配置Keetle
最后点击测试。