Reputation: 173
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
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
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"
sqoop list-databases --connect jdbc:sqlserver://192.168.56.1:1433 --username hadoop --password hadoop1
Upvotes: 1