简体   繁体   中英

Sqoop import from IBM db2 to Hive

I was trying to import data from db2 to hdfs, got below error with respect to this specific database. I am new to DB2, this error seems to be more related to db2 database and driver.

sqoop import --connect jdbc:db2://db2_host101:60006/DB_NAME --username hduser --table repo.table_abc --hive-import --hive-overwrite --hive-table repo.table_abc --target-dir /target_dir/table_abc -m 1 -P

Error:

An attempt was made to access a database, DB_NAME, which was either not found or does not support transactions. ERRORCODE=-4499, SQLSTATE=08004

Do transactions needs to be enabled on DB2 for sqoop to work. Any pointers?

I was able to solve this by reaching out to our db2 DBA. I was using the wrong "DB_NAME", so the first part in the error statement was correct, It was unable to find the database. Though, second part of the error confused me initially.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM