0

谁能指导一下?我正在使用微软的 sqljdbc4.jar?

hduser@ubuntu:/usr/local/sqoop/lib$ sqoop list-tables --connect jdbc:sqlserver/Northwind --username sa --password xxxxxxx --driver com.microsoft.sqlserver.jdbc.SQLServerDriver

我得到的结果如下

Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
13/07/08 14:45:32 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
13/07/08 14:45:32 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
13/07/08 14:45:32 INFO manager.SqlManager: Using default fetchSize of 1000
13/07/08 14:45:33 ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLException: No suitable driver found for jdbc:sqlserver/Northwind
Could not retrieve tables list from server
13/07/08 14:45:33 ERROR tool.ListTablesTool: manager.listTables() returned null

我还尝试将 -libjars 添加到命令中

4

1 回答 1

1

我认为问题在于无效的 JDBC URL“jdbc:sqlserver/Northwind”。URL 必须至少以“jdbc:sqlserver://”开头(例如缺少“://”部分)。请查看官方文档以获取更多详细信息。

此外,我强烈建议删除 --driver 选项,因为它会指示 Sqoop 使用不同的连接器。有关详细信息,请参阅提供的日志片段(以“参数--驱动程序设置为...”开头的行)。

于 2013-07-09T14:24:13.050 回答