问题:

      今天往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。80378
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2022-12-23
  • 2021-08-28
  • 2021-07-07
  • 2021-10-28
  • 2022-01-20
  • 2021-08-25
  • 2022-01-07
猜你喜欢
  • 2021-10-27
  • 2021-11-27
  • 2021-11-10
  • 2021-09-16
  • 2021-10-30
  • 2021-11-03
相关资源
相似解决方案