Hive中导入Oracle数据错误:Listener refused the connection with the following error: ORA-12505

电玩女神 2021-09-15 05:02 437阅读 0赞

问题:

  1. 今天往Hive中导入Oracle数据的时候碰到了如下错误:Listener refused the connection with the following error:

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

解决办法:

导入数据的语句如下:

/usr/bin/sqoop import —connect jdbc:oracle:thin:@20.20.20.20:1521:jh —username *** —password *** —table *** -m 1 —fields-terminated-by “,” —hive-database *** —hive-table *** —hive-import —hive-overwrite

修改导入语句@20.20.20.20:1521:jh中的jh为数据库安装目录tnsnames.ora下SERVICE_NAME的名字。因为这里导入语句中需要的是SERVICE_NAME的名字为而不是SID。

发表评论

表情:
评论列表 (有 0 条评论,437人围观)

还没有评论,来说两句吧...

相关阅读