Hi, I am new on sqoop and facing a problem since last 2 days.
I am using Ambari-sandbx on VMware. These the version detailsHDP 2.6Sqoop 1.4.6I am unable to connect MsSql in sqoop .When i try to list the databases using below command then i got this error.
sqoop list-databases --connect jdbc:sqlserver://VM-TFS/ --username abc --password test123error:ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.microsoft.sqlserverDriverI googled this error and find a solution here,
According to @Artem Ervits copy sqljdbc42.jar file into the usr/hdp/current/sqoop-client/lib folder
As you can see in the left section of the image-1 that i can view hdp folder In CLI but not in WinSCP.I downloaded sqljdbc42.jar on my window pc and copied it in to /usr/local by using WinSCP.Then tried to copy this jar file from /usr/local to /usr/hdp/current/sqoop-client/lib as suggested in the above solution by using below command but got another error.
command:cp /usr/local/sqljdbc42.jar /usr/hdp/current/sqoop-client/liberror:cp: cannot stat `/usr/local/sqljdbc42.jar': No such file or directoryAlthough sqljdbc42.jar is available in usr/local as you can see in image-2 but i don't know why i getting this error.Kindly help me.
Try below steps:
1. Run command dos2unix /usr/local/sqljdbc42.jar
2. Then try to copy, cp /usr/local/sqljdbc42.jar /usr/hdp/current/sqoop-client/lib as root user.