sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gwen Shapira <gshap...@cloudera.com>
Subject Re: Sqoop Import Error from Mainframe DB2
Date Thu, 24 Jul 2014 22:22:02 GMT
Two more things:

1. You can use either db2jcc.jar or db2jcc4.jar, but make sure you
only have one of them in the lib directory.

2. You MUST specify "type 4" URI (jdbc:db2://server:port/database). If
you specify a Type-2 URL like jdbc:db2:database, the driver will try
to look for the native libraries, which don't exist on the cluster.

Gwen

On Thu, Jul 24, 2014 at 3:00 PM, Gwen Shapira <gshapira@cloudera.com> wrote:
> The JDBC seems like the right one.
>
> I see you are using CDH5, did you install it according to the directions here?
> http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/cdh5ig_jdbc_driver_install.html
>
> On Thu, Jul 24, 2014 at 2:56 PM, Venkat, Ankam
> <Ankam.Venkat@centurylink.com> wrote:
>> I am still getting same error.
>>
>> sqoop list-tables --driver com.ibm.db2.jcc.DB2Driver --connect jdbc:db2:@XXXXX.com:455/USCTFN01DB2HD1
--username XXXXXX --password YYYYY
>>
>> 14/07/24 14:30:21 ERROR manager.SqlManager: Error reading database metadata: com.ibm.db2.jcc.am.SqlException:
[jcc][10389][12245][3.65.110] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError:
no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null
>> com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.65.110] Failure in loading
native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:
 ERRORCODE=-4472, SQLSTATE=null
>>
>> Any thoughts?  Did I get the right JDBC jar?
>>
>> Regards,
>> Venkat
>>
>>
>> -----Original Message-----
>> From: Gwen Shapira [mailto:gshapira@cloudera.com]
>> Sent: Thursday, July 24, 2014 3:07 PM
>> To: user@sqoop.apache.org
>> Subject: Re: Sqoop Import Error from Mainframe DB2
>>
>> Hi,
>>
>> Here's what I use:
>> sqoop list-tables --driver com.ibm.db2.jcc.DB2Driver --connect jdbc:db2://example.com:50000/MYDB
--username MY --password password
>>
>> I think the DBNAME is required.
>>
>> Gwen
>>
>> On Thu, Jul 24, 2014 at 1:04 PM, Venkat, Ankam <Ankam.Venkat@centurylink.com>
wrote:
>>> I need to import data from Mainframe DB2 to Hadoop using Sqoop.  I am
>>> getting below errors.  Any help on this highly appreciated.
>>>
>>>
>>>
>>> With command  à  sqoop list-databases --connect
>>> jdbc:db2://xxxxxx.com:455/ --username XXXXX --password YYYYY
>>>
>>> Error: Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException:
>>> [jcc][10165][10047][4.14.111] Invalid database URL syntax:
>>> jdbc:db2://d1vipa.corp.intranet:455/. ERRORCODE=-4461, SQLSTATE=42815
>>>
>>>
>>>
>>> With command  à sqoop list-databases --connect
>>> jdbc:db2:@xxxxxx.com:455/ --username XXXXX --password YYYYY
>>>
>>> Error: Caused by: com.ibm.db2.jcc.am.SqlException:
>>> [jcc][10389][12245][4.14.111] Failure in loading native library
>>> db2jcct2,
>>> java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:
>>> ERRORCODE=-4472, SQLSTATE=null
>>>
>>>
>>>
>>> Downloaded DB2 Version 10.1 JDBC driver (both 3.0 and 4.0) and after
>>> extracting I see two jar files (db2jcc4.jar and db2jcc.jar).
>>>
>>>
>>>
>>> I copied db2jcc4.jar to
>>> /opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/sqoop/lib and
>>> then tried above two commands.  Tried with db2jcc.jar as well but
>>> getting same errors.  Tried copying these jars from both 3.0 and 4.0
>>> versions after deleting the earlier JDBC.
>>>
>>>
>>>
>>> Mainframe DB2 version is 10.1 and My Sqoop version is Sqoop 1.4.4-cdh5.0.0.
>>>
>>>
>>>
>>> Any quick help?
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Venkat Ankam

Mime
View raw message