Configure SQuirrel SQL Client to work for DB2/AS400

22.3k views Asked by At

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.

2

There are 2 answers

2
Paul Bastide On BEST ANSWER

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  
0
jweberhard On

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