Sqoop data from SQLServer

Hi,
I was trying to run a sqoop query to pull data from my sql server but I got this error in web console:“Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver” .Please install the driver in cloudxlab.

Hi Mayank,

Can you please check now? It should work. I’ve copied sqljdbc42.jar to /usr/hdp/current/sqoop-client/lib

Hope this helps.

1 Like

Hi Abhinav,

Please let me know the SQL server password, while importing the data from SQL server to HDFS it’s asking password.

Username :sqoopuser
Pasword:?

Hi @sankar_krishna,

We do not have SQL server. Please find MySQL password here

Hope this helps.

Thanks

Hi Abhinav,

When i’m trying to run below comment, i’m getting communication link failure error. Please do the needful.

sankarkrishetl1189@ip-172-31-20-58 ~]$ sqoop import --connect jdbc:mysql://ip-172-31-20-58/3306/sqoopex --table orders -m 1 --username sqoopuser -P --split-by order_id
18/02/22 15:09:38 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.3.4.0-3485
Enter password:
18/02/22 15:10:00 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
18/02/22 15:10:00 INFO tool.CodeGenTool: Beginning code generation
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.4.0-3485/accumulo/lib/slf4j-log4j12.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]
18/02/22 15:10:00 ERROR manager.SqlManager: Error executing statement: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.