Siva Karthikeyan
Siva Karthikeyan

Reputation: 554

No suitable driver found for jdbc for SQL Server Express 2008 R2 when executing list-tables with Sqoop

Can any one guide? I'm using sqljdbc4.jar from microsoft?

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

Result I'm getting is as follows

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

I also tried to add -libjars to the command

Upvotes: 0

Views: 1419

Answers (1)

Jarek Jarcec Cecho
Jarek Jarcec Cecho

Reputation: 1726

I believe that the issue is in invalid JDBC URL "jdbc:sqlserver/Northwind". The URL have to start at least with "jdbc:sqlserver://" (e.g. there is missing the "://" part). Please take a look into official documentation for more details.

Also in addition I would strongly recommend to drop the --driver option as it will instruct Sqoop to use different connector. Please refer to the provided log fragment for more details (line starting with "Parameter --driver is set to...").

Upvotes: 1

Related Questions