Support Questions

Find answers, ask questions, and share your expertise

Sqoop connector for Microsoft SQL Server

avatar
Expert Contributor

Microsoft says that the Sqoop connector for Hadoop is now included in Sqoop 1.4 and no longer provides a direct download, but I can't seem to find it. Which jar should I be using, and do I need to manually specify a JDBC driver class?

Running "sqoop list-databases --connect jdbc:sqlserver://<IP Address>:<Port Number> --username <Username> --password <Password>" results in "RuntimeException: Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver". This is with Sqoop 1.4.6.

1 ACCEPTED SOLUTION

avatar
Master Mentor

download it here http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774, you need the tar.gz file, extract and place in sqoop lib folder.

View solution in original post

6 REPLIES 6

avatar

You can use the sqljdbc4.jar that ships under the windows install of HDP at <OOZIE_HOME>/extra_libs.

avatar
Master Mentor

download it here http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774, you need the tar.gz file, extract and place in sqoop lib folder.

avatar
New Contributor

I am using HDP sandbox and not sure where is the sqoop lib folder. I see this file path /hdp/apps/2.4.0.0-169/sqoop and I placed the sqljdbc.jar file here:, but still get the same error. Is there some other place the file needs to be placed? Also, the sqoop.tar.gz file is also present in the same file path [it came with the package]. Does that also have to be extracted and placed elsewhere? Thank you for your help.

avatar
Super Guru

@Artem Ervits, @Deepesh, @Mike Riggs

I'm trying this in HDP 2.4 sandbox with SQL Server Express 2014. Connectivity is ok.

Even you add it to /var/lib/sqoop/lib/ or /usr/lib/sqoop/lib folder, how do you get past that a connection-manager needs to be set to use a factory class in order to use the Microsoft driver? The error (even is shown as a WARN) is:

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.

Due to this, the command does not work.

This error is thrown after executing a command like this:

sqoop list-databases --driver com.microsoft.sqlserver.jdbc.SQLServerDriver --connect jdbc:sqlserver://10.226.170.191\poc:1433 --username WHATEVERUSER --password WHATEVERPASSWORD

--connection-manager directive seems to be needed. What needs to be added?

avatar
Master Mentor

Why is there a forward slash in jdbc string?

avatar
Rising Star

Copy sqljdbc42.jar to following location /usr/hdp/current/sqoop-client/lib/ and try

Don't even need to use --driver option