Configure SQuirrel SQL Client to work for DB2/AS400
Asked Answered
A

2

7

I use the ancient System i Navigator (french) to get to query a DB2 (AS/400) database.

I liked to update the client and use a more fresh (and English) sql client for that database.

So, I installed the SQuirrel SQL client (3.5.0, the latest at day).

After the installation and launching, I discovered that the "IBM DB2 App Driver" is not "checked". The message when I click on it says:

"Could not find class COM.ibm.db2.jdbc.app.DB2Driver in neither the Java class path nor the Extra class path of the IBM DB2 App Driver driver definition: java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver"

As I understood I need to copy a (universal?) JDBC driver in the SQuirrel "\lib" folder. How to get it?

I don't have any "classpath" defined in the environmental variables (I am on Windows 7 x64). I am not a Java developer, so I am not sure if I need or not to configure that classpath to make work that sql client.

Awestricken answered 17/12, 2013 at 12:59 Comment(0)
L
9

if it's an AS400, then you should use JTOpen libraries to connect.

http://jt400.sourceforge.net/

JT400 has the JARS you need to use. Note, the class name mentioned above is not the same as what is expected on the AS400....

I remember it being something like this....

com.ibm.as400.access.AS400JDBCDriver... you'll want to double check

if you start squirrel-sql on the commandline you can add this

set CLASSPATH=%CLASSPATH%;c:/jt400.jar  
Lighting answered 19/12, 2013 at 13:11 Comment(2)
you are a genius! I just added the jt400.jar in the "lib" folder of the SQuirrel SQL client.Awestricken
I also recommend considering connection settings mentioned in https://mcmap.net/q/1621375/-specify-and-use-multiple-libraries-in-odbc-connection-stringRenaldorenard
G
0

If want a really quick and easy "command-line" JDBC client, you can use the one included in the JTOpen. I use it all the time so I don't have to open yet another window.

Here is an example.

~> java -cp jt400.jar com.ibm.as400.access.jdbcClient.Main jdbc:as400:AS400 SYSTEM USERID PASSWORD  
>select * from sysibm.sysdummy1
IBMREQD
Y
Got answered 25/7, 2014 at 21:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.