db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Derby, ODBC and IBM DB2 Client...
Date Wed, 10 Oct 2007 09:44:18 GMT
Robin Twombly <robin.twombly@gmail.com> writes:

> Hello,
> I have been working to setup the JavaDB database as a Network Database, and
> using IBM's DB2 Client a user can setup a Client ODBC connection to the
> database.  I was able to do this successfully but it took some doing,
> reading, and guessing.
>
> Using the following link I was able to set this up but I still have some
> questions:
>
> http://www.ibm.com/developerworks/db2/library/techarticle/dm-0409cline2/readme_win.txt
>
>
> 1) When setting up JavaDB, Derby, or Cloudscape as a network server where
> and at what points are the db2jcc.jar and the db2jcc_license_c.jar needed?
> Are they needed in the classpath when the Server
> is started up? when the database is created? Please help on this.
> The above document seems to say it is only needed by the ij utility when the
> database is created.

Hi Robin,

db2jcc.jar and db2jcc_license_c.jar are only needed on the client side
when you need to access the database via JDBC (this is what ij
does). They are not needed on the server. I would however strongly
recommend that you use Derby's own network client driver
(derbyclient.jar) instead of the DB2 JCC driver, as it's more
feature-rich, better integrated with the rest of Derby, and it's
supported by the community.

To use the Derby network client driver, you could follow the steps in
the article, but with these changes to section 4.3:

  1) Classpath should point to derbytools.jar and derbyclient.jar

  2) The connection URLs need to be changed slightly. Most importantly,
  the 'net:' part of the URL should be removed, and the colon before the
  user attribute should be replaced with a semicolon. Something like
  this should work:

    connect 'jdbc:derby://localhost/DatabaseName;create=true;user=usr;password=pwd';

> 2) Can the db2jcc.jar and the db2jcc_license_c.jar be moved or do they need
> to say in the directory
> where the IBM db2 client was installed?  I could not connect from the db2
> command line tool
> when the jar files had been moved to their own directory, but when they were
> referenced from the
> directory where they were installed I could connect.

I'm not familiar with the DB2 command line tool, so I can't answer this
one.

> Any help on this would be great. I have read the above linked document but
> these questions were
> not really detailed in this.

-- 
Knut Anders

Mime
View raw message