Reply
New Contributor
Posts: 2
Registered: ‎01-18-2014

SQOOP - IBM DB2 Connection

Hi,

 

Has any one imported data from IBM DB2 data base ( which is on ZOS ) using SQOOP ?

 

Thanks

 

Contributor
Posts: 43
Registered: ‎08-20-2013

Re: SQOOP - IBM DB2 Connection

No experience with connecting hadoop with ZOS DB2, but I don't see why it won't work.  DB2 has a JDBC driver, right?  So the configuration would be the same for DB2 as for other databases.  

 

This IBM website has the details on what parameter values you need to connect to DB2:

http://pic.dhe.ibm.com/infocenter/bigins/v2r0/index.jsp?topic=%2Fcom.ibm.swg.im.infosphere.biginsigh...

Explorer
Posts: 23
Registered: ‎02-21-2014

Re: SQOOP - IBM DB2 Connection

The command that is working for me:

sqoop import --driver com.ibm.db2.jcc.DB2Driver --connect jdbc:db2://IP:PORT/DSDB2D01 --username XXX -P --table "tablename"

 

But before that you have to copy the jar file to /var/lib/sqoop.

New Contributor
Posts: 1
Registered: ‎06-30-2014

Re: SQOOP - IBM DB2 Connection

Just finished up testing import/export with DB2 for Z. First step is to copy jdbc driver into your sqoop/lib dir.  With a 10 system cluster running and having an index on column C1 I was able to use 9 maps for parrallelism.  Also the options below make sqoop use the generic jdbc driver, we aren't using the DB2 specifc connector which is for LUW only.  My import from DB2 Z into hadoop looked like:

 

sqoop import --driver com.ibm.db2.jcc.DB2Driver --connect jdbc:db2://192.168.1.1:59000/DB2LOC1 --username SYSADM --password password --table SYSADM.TB1  --split-by C1 --target-dir "/user/biadmin/1GBTBL" -m 9

 

 

Explorer
Posts: 19
Registered: ‎10-15-2014

Re: SQOOP - IBM DB2 Connection

I am having a very similar issue that I need some help on.  When I try to ingest data from a DB2 z/OS system here is the output:

 

16/01/25 16:57:03 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
16/01/25 16:57:03 INFO manager.SqlManager: Using default fetchSize of 1000
16/01/25 16:57:03 INFO tool.CodeGenTool: Beginning code generation
16/01/25 16:57:04 ERROR manager.SqlManager: Error executing statement: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10165][10036][4.15.134] Invalid database URL syntax: jdbc:db2://<DB IP>:<DB Port>/<Location or SSID Name>/. ERRORCODE=-4461, SQLSTATE=42815
com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10165][10036][4.15.134] Invalid database URL syntax: jdbc:db2://<DB IP>:<DB Port>/<Location or SSID Name>/. ERRORCODE=-4461, SQLSTATE=42815

 

If I do a "telnet <DB IP>  <DB Port>" command it comes back with a response so I know it is there.

 

I have put the "db2jcc4.jar" into the /var/lib/sqoop/  directory.

 

Please advise.

Highlighted
SH
New Contributor
Posts: 1
Registered: ‎01-16-2018

Re: SQOOP - IBM DB2 Connection

hi BrettM ,

Did you find a solution for this ?

I am trying to connect DB2 on Z/OS using Sqoop .

Announcements

Our community is getting a little larger. And a lot better.


Learn More about the Cloudera and Hortonworks community merger planned for late July and early August.