Katanic
Katanic

Reputation: 173

Sqoop Invalid connection URL SQL Server

When I try to run sqoop I get the following error:

java.lang.IllegalArgumentException: Invalid connection URL url jdbc:sqlserver://{host}:{port}

My command is:

sqoop list-databases \
--connect jdbc:sqlserver://{host}:{port} --username abc --password xyz

Any suggestions?

Upvotes: 0

Views: 402

Answers (2)

praveen kumar
praveen kumar

Reputation: 31

we have the same issue, once i removed mariadb-java-client-1.4.6.jar and mariadb-java-client-1.2.0.jar from hive lib folder, sqoop commands to mssql working as expected.

Upvotes: 0

Ronak Patel
Ronak Patel

Reputation: 3849

This is the valid SQLserver URL: jdbc:sqlserver://xx.xx.xx.xx:3464;databaseName=testing

your command should use hostname or IP in JDBC string NOT username, you can get hostname of your computer from this command: hostname -f or use hostname -i for IP

sqoop list-databases \
--driver com.microsoft.jdbc.sqlserver.SQLServerDriver \
--connect 'jdbc:sqlserver://{host}:{port}' \
--username abc \
--password xyz

OR

sqoop list-databases 
--connect "jdbc:sqlserver://ML-xyz:1433;username=abc;password=abc"

example is here:

sqoop list-databases --connect jdbc:sqlserver://192.168.56.1:1433 --username hadoop --password hadoop1

Upvotes: 1

Related Questions