I downloaded sqljdbc4.jar
. I\'m invoking sqoop
like so from the folder (where the jar is stored):
sqoop list-tables --driver com.microso
You need to put sqljdbc4.jar
in $SQOOP_HOME/lib
and also add sqoop-1.4.4.jar
or whatever version you are using along with sqljdbc4.jar
to $HADOOP_HOME/lib
.
I'm using Hadoop-2.2.0
, so i put it inside $HADOOP_HOME/share/hadoop/common/lib
directory, and use the following command to do the import:
export HCAT_HOME=/home/Kuntal/BIG_DATA/hive-0.12.0/hcatalog
(sometimes HCatlog
of Hive needs to be export
ed or set
.)
./sqoop-import --connect "jdbc:sqlserver://IP\INSTANCE;port=1433;username=USERNAME;password=PASSWORD;database=DATABASE_NAME" --table TABLE_NAME --target-dir hdfs://localhost:50315/sqoop --m 1
Sometimes you have to specify the port, otherwise default works. Hope you find it useful.