2015-05-29 103 views
0

我正在使用Hortonworks Sandbox 2.2虛擬機,並且在針對oracle運行Sqoop時遇到問題。我執行命令,如:Sqoop list-tables問題

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指定作爲參數,則列表-tables命令工作正常,但導入失敗,錯誤「ORA-00933:SQL命令沒有正確結束」。我在幾個地方讀過,指定--driver參數不是正確的解決方法,但是當我沒有指定它時,我無法獲得任何東西。

我在這裏做錯了什麼?

回答

0

嘗試以下步驟 1 $ SQOOP_HOME /放置ojdbc6.jar LIB 2.取出--driver選項 3.引用的所有參數

0

除了@gopikrishna_BD anwser,Oracle數據庫存儲表格名稱以defalut大寫。因此,在執行sqoop導入時,以大寫形式給出表名。您還應該以大寫形式提供數據庫名稱。

article將幫助您瞭解有關Sqoop與Oracle的更多信息。