【问题标题】:Sqoop list-tables issueSqoop 列表问题
【发布时间】:2015-05-29 16:04:59
【问题描述】:

我正在使用 Hortonworks Sandbox 2.2 VM,但在针对 oracle 运行 Sqoop 时遇到问题。我正在执行如下命令:

sqoop list-tables --connect jdbc:oracle:thin:@mydbhost.com:1521/sid --username user --password password

它执行了,但什么也没发生:

Warning: /usr/hdp/2.2.4.2-2/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/05/29 15:55:58 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.4.2-2
15/05/29 15:55:58 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/05/29 15:55:58 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
15/05/29 15:55:58 INFO manager.SqlManager: Using default fetchSize of 1000
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/hive/lib/hive-jdbc-0.14.0.2.2.4.2-2-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
15/05/29 15:55:59 INFO manager.OracleManager: Time zone has been set to GMT

如果我指定 --driver oracle.jdbc.OracleDriver 作为参数,则 list-tables 命令可以正常工作,但导入失败并出现错误“ORA-00933:SQL 命令未正确结束”。我在几个地方读到,指定 --driver 参数不是正确的处理方式,但是当我没有指定它时,我什么都做不了。

我在这里做错了什么?

【问题讨论】:

    标签: hadoop sqoop hortonworks-data-platform


    【解决方案1】:

    尝试以下步骤 1. 将ojdbc6.jar 放在$SQOOP_HOME/lib 2.删除--driver选项 3.引用所有参数

    【讨论】:

      【解决方案2】:

      除了@gopikrishna_BD anwser,Oracle db 默认以大写形式存储表名。因此,在进行 sqoop 导入时,请以大写形式给出表名。您还应该以大写形式提供数据库名称。

      article 将帮助您了解有关 Sqoop 与 Oracle 的更多信息。

      【讨论】:

        猜你喜欢
        • 2017-03-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-07-23
        • 2016-10-08
        • 2015-11-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多