sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venkat Ranganathan <vranganat...@hortonworks.com>
Subject Re: Sqoop Import Error from Mainframe DB2
Date Fri, 25 Jul 2014 16:49:40 GMT
For using DB2, as Gwen said you have to use the Type 4 URL (pure java
implementation of the DB2 driver).   The name of the driver jar will
be db2jcc4.jar.

The URL to use would be dbc:db2://HOST:PORT/DB

I specifically added --relaxed-isolation for DB2 on mainframe access
because of lock escalation issues reported by a customer.   Use
--relaxed-isolation on the command line (should be part of 1.4.5 or if
you build from trunk - not sure about CDH5 version).

Venkat (Ranganathan)

On Thu, Jul 24, 2014 at 6:41 PM, Gwen Shapira <gshapira@cloudera.com> wrote:
> Hi Sean,
>
> Venkat is using Sqoop1 and Hadoop actually managed to find the driver.
> Lets not mix up the two issues?
>
> You are right to note that 1.99 is a PITA, thats why its a 1.99 - it
> will become 2.0 when it works (we are painfully aware it currently
> does not).
> I'm sorry for all the headache it caused you :(
> Would you consider giving Sqoop 1.4.4 a try before you go back to
> Python? I believe it is stable enough - was using it in production for
> a while now.
>
>
> Gwen
>
> On Thu, Jul 24, 2014 at 6:32 PM, Sean Franks <seancfranks@gmail.com> wrote:
>> The only fix to the drivers problem that I could make work was to load the .jar file
in the /lib/ext/ directory of Java. I know that this means I need to be vigilant about maintenance
on the machine, but unless or until the Hadoop vendors make it a tad easier to load out a
driver file, it's a s---load easier on my blood pressure than the nonsense I went through
for the past 2 days. I would give y'all the exact destination directory, but I've powered
down my clusters for the night and am now starting to get dirty looks from my g-friend. When
I power the sucker up again tomorrow, I'll post the exact location where I loaded the driver
file to get sqoop2 to finally do something that resembles work. I still have problems with
Accumulo though.
>>
>> But I'm still going back to writing everything in Python with import(ed) db extenders/connectors.
Sqoop is just NOT stable enough for prime time. Never was. Probably never will be.
>>
>>
>>
>> Sean Franks | (212) 284-8787
>> “With the addition of a well structured Big Data ecosystem to the Data Highway
of an enterprise, Business Intelligence analytics will take a quantum leap forward.”
>>
>>
>> -----Original Message-----
>> From: Venkat, Ankam [mailto:Ankam.Venkat@centurylink.com]
>> Sent: Thursday, July 24, 2014 5:56 PM
>> To: 'user@sqoop.apache.org'
>> Subject: RE: Sqoop Import Error from Mainframe DB2
>>
>> 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
>>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Mime
View raw message