【已解决】JDBC 接口连接 Oracle 数据库问题

Viewed 42

网络和端口都是通的,在另外的window机器上使用客户端工具可以连上oracle。
oracle11g,下载的包ojdbc8-23.4.0.24.05.jar。

CREATE CATALOG oracle_test PROPERTIES (
"type"="jdbc",
"user"="cdc",
"password"="cdc",
"jdbc_url" = "jdbc:oracle:thin:@10.0.20.252:1521:orcl",
"driver_url" = "file:///opt/soft/doris/apache-doris-2.1.0-bin-arm64/ojdbc8.jar",
"driver_class" = "oracle.jdbc.driver.OracleDriver"
)

mysql> show databases oracle_test;
ERROR 1105 (HY000): ParseException, msg:
mismatched input 'databases' expecting 'CONSTRAINTS'(line 1, pos 5)

1 Answers

知道原因了,oracle11g要使用ojdbc6,还以为高版本向下兼容呢。