我正在尝试从sql server导入HDFS,但我收到错误:
hadoop@ubuntu:~/sqoop-1.1.0/bin$ ./sqoop import --connect 'jdbc:sqlserver://192.168.230.1;username=xxx;password=xxxxx;database=HadoopTest' --table PersonInfo --target-dir /home/hadoop/hadoop-0.21.0/
11/12/10 12:13:20 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: No manager for connect string: jdbc:sqlserver://192.168.230.1;username=xxx;password=xxxxx;database=HadoopTest
at com.cloudera.sqoop.ConnFactory.getManager(ConnFactory.java:119)
at com.cloudera.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:178)
at com.cloudera.sqoop.tool.ImportTool.init(ImportTool.java:81)
at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:411)
at com.cloudera.sqoop.Sqoop.run(Sqoop.java:134)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:83)
at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:170)
at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:196)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:205)
我没有得到什么问题? 我的Hadoop版本:hadoop-0.21.0 Sqoop版本:sqoop-1.1.0
请建议我解决。 谢谢。
答案 0 :(得分:2)
你的语法错了。使用以下语法
./sqoop import --connect jdbc:sqlserver://192.168.230.1:<PORT_NUMBER>/HadoopTest --username xxx --password xxxxx --table PersonInfo --target-dir /home/hadoop/hadoop-0.21.0/
还要确保jdbc jasrs应该出现在
中$SQOOP_HOME/lib
答案 1 :(得分:-1)
您需要指定Drivermanager
- 驱动程序com.microsoft.jdbc.sqlserver.SQLServerDriver