hive - 无法使用 SQOOP 列出 MS SQL 中的表

标签 hive sqoop

我尝试使用 sqoop 命令列出 MS SQL 中的数据库

sqoop list-databases --connect jdbc:sqlserver://10.x.x.x --username my_usrnme --password my_pwd 

它可以正确列出 SQL Server 中的所有数据库。

但是当我尝试使用命令列出特定数据库中的表时

sqoop list-tables --connect jdbc:sqlserver://10.x.x.x/db_name --username my_usrnme --password my_pwd

我收到的错误为

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 10.x.x.x/db_name, port 1433 has failed. Error: "null. Verify the
connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."

有人遇到过这个问题吗?

最佳答案

我的查询在稍微更改命令后有效

sqoop list-tables --connect 'jdbc:sqlserver://10.x.x.x;database=db_name' --username my_usrnme --password my_pwd

需要的是,servername 和 dbname 必须位于 ' '(单引号)中并用 ; 分隔。 (分号)。

关于hive - 无法使用 SQOOP 列出 MS SQL 中的表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32503889/

相关文章:

hadoop - Hive No files matching path file 和 file Exists

java - Java 中的 Spark Hive Context hql 问题 - 在 yarn 中运行 spark 作业时

hadoop - 包含 Sqoop 导入失败的 Oozie 脚本操作

oracle - Sqoop 导入 Oracle 到 HDFS 3 条记录就可以了。全表失败

hadoop - Sqoop 停留在进度的 5%

hadoop - Hive 文件格式优缺点

hive - 有没有办法在 Hive 中转置数据?

hadoop - 在Hive上创建表时出错

hadoop - apache sqoop安装缺少addtowar脚本

java - Sqoop2 找不到 AuditLoggerManager