Forum Discussion

Purush's avatar
Occasional Contributor
3 years ago

Unable to connect DB2 using the JDBC driver

Hello, Recently, i have downloaded the new version of READY API (3.20.2) and started using it. Unfortunately, I am not able to connect to the database (DB2). I downloaded the jar (db2jcc4-9.7.jar)...
  • richie's avatar
    3 years ago
    Hey Purush,

    Firstly you need to confirm the following:

    1. What version of DB2 are you trying to connect to? (ASK YOUR DBAs)
    2. What is correct version of jdbc drivers to connect to your DB2 version? and download correct version and save to %/bin/ext (GOOGLE SEARCH)
    3. What is the version of java that supports your jdbc drivers? and download correct java version and set your java environment variable if needed (GOOGLE SEARCH)
    4. You have a DB2 JDBC connection string defined in File >> Preferences >> JDBC. You need to determine the correct parameter values defined to connect to your DB2 instance (ASK DBAs)

    Then setup a JDBC test step, pointing to the DB2 driver and then complete the dynamically generated fields with the parameter values your DBAs have indicated.

    I appreciate you may have done all the above already, however, there's only 3 things (java (maybe environment variable), drivers, connection string) required to setup a connection correctly and if youre having problems the issue is with at least one of these. The fact that the error is saying failed to initialise connection makes me think drivers or connection string, but ive found when struggling its best (at least for me) to start the whole process again, so i know ive got everything set correctly.

    Once you've confirmed all the above, reply to this so we can see where you are and if youre still struggling we can go from there.