Hi Ashutosh,
I've been working with DB2 and SQuirreL recently. I've been meaning to log
an enhancement request about providing better default driver information.
It would be nice (and simple) to increase and improve url examples that
are listed. But I haven't had the time yet.
To select the class file you should "Modify driver..." and then on the tab
"Extra Class Path" and browse to the jar or zip that you want to use.
After this you'll see the "X" icon change to a check mark icon. (It's also
possible to add the driver to your SQuirreL classpath as you were
attempting, but I suggest that it's cleaner to use the Extra Class Path
method.)
Here are a few DB2 notes that I made which may be useful for you. There
are LOTS of versions of DB2 and lots of JDBC drivers. For some purposes,
these are the important JDBC facts:
"The APP driver" - The IBM DB2 App Driver is a type-2 JDBC driver. This
means you must install the DB2 client classes (dlls) on your client. This
is generally bad for Java apps.
driver: COM.ibm.db2.jdbc.app.DB2Driver
url: jdbc:db2:<dbname>
delivered in: db2java.zip
"The Universal driver" - The IBM DB2 Universal Driver is a type-2 JDBC
driver.
driver: com.ibm.db2.jcc.DB2Driver
url: jdbc:db2:<dbname>
delivered in: db2jcc.jar
"The NET driver" (occasionally known as "The COM driver" - The Net Driver
is a type-3 JDBC driver.
driver: COM.ibm.db2.jdbc.net.DB2Driver
url:jdbc:db2://<server hostname or IP address>:<DB2 JDBC Applet Server
port number> / <dbalias>
delivered in: db2java.zip
"The Universal driver" - The IBM DB2 Universal Driver is a type-4 JDBC
driver.
driver: com.ibm.db2.jcc.DB2Driver
url: jdbc:db2://<server hostname or IP address>:<DB2 UDB Instance port
number> / <dbalias>
delivered in: db2jcc.jar
The default port DB2 runs on is 50000 (Not 6789. One of IBM's sample JDBC
pages includes an applet running on 6789, and this confuses some people.)
Note that the universal driver is listed twice. The same class can be used
as a type-2 or a type-4 driver. You have to look at the url to know which
one is being used. Also, I think you'll need to add db2jcc_license_cu.jar
as well as db2jcc.jar to the classpath.
All the rules change with DB2 for iSeries. The above notes apply only to
DB2 UDB.
My notes were from using DB2 Express 9. I hope they're still useful for
you, but they probably won't be exactly right. I would be interested in
any corrections or additions that you discover.
Good luck,
Matt
-----Original Message-----
From: squ...@li...
[mailto:squ...@li...] On Behalf Of
Ashutosh N Sharma
Sent: Tuesday, 24 April, 2007 10:42
To: squ...@li...
Subject: [Squirrel-sql-users] Squirrel and DB2 7.2
Have any one used it?
I am using SQuirreL SQL Client Version 2.3.2 and DB2 7.2.
Which of the jar/zip files i need to use and what is the connection string
to be connected to it?
Where i need to put these jar/zip files?
I tried putting into "C:\Program Files\SQuirreL SQL Client\lib\" but it
doesn't work.
It's reading from the Classpath and i have changed that also.
Some how it is not able to find the IBM DB2 App Driver-as "X' appears in
it's name.
With Best Regards
Ashutosh Sharma
American Express made the following
annotations on 04/24/07, 10:41:45
--------------------------------------------------------------------------
----
**************************************************************************
****
"This message and any attachments are solely for the intended recipient
and may contain confidential or privileged information. If you are not the
intended recipient, any disclosure, copying, use, or distribution of the
information included in this message and any attachments is prohibited. If
you have received this communication in error, please notify us by reply
e-mail and immediately and permanently delete this message and any
attachments. Thank you."
American Express a ajouti le commentaire suivant le 04/24/07, 10:41:45
Ce courrier et toute pihce jointe qu'il contient sont riservis au seul
destinataire indiqui et peuvent renfermer des renseignements confidentiels
et priviligiis. Si vous n'jtes pas le destinataire privu, toute
divulgation, duplication, utilisation ou distribution du courrier ou de
toute pihce jointe est interdite. Si vous avez regu cette communication
par erreur, veuillez nous en aviser par courrier et ditruire immidiatement
le courrier et les pihces jointes. Merci.
**************************************************************************
****
==========================================================================
====
|