Ask a Question

Unable to connect DB2 using the JDBC driver

Occasional Contributor

Unable to connect DB2 using the JDBC driver


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) and saved it in the bin folder (...ReadyAPI-3.10.0\bin\ext).

My java version is 1.8.0_301.

I tried setting the classpath as suggested.


Still it is returning an error message:

" Failed to initialize the connection that uses the [] driver. Connection string: [jdbc:db2://xxxxxxx-db2-xx:xxxxx/xxxxx:user=xxxxxx;password=####;]."


Thanks in advance for your suggestions.





Community Hero

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.


if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Occasional Contributor

Hi Richie,

Thanks a lot for taking time to reply my message.

As suggested, i will contact my DBA for more details.

I try again as mentioned in your mail and get back to you.

Kind regards




Occasional Contributor

Hi Richie,

Thanks for your suggestions and it worked well.

The version driver was not good.



Showing results for 
Search instead for 
Did you mean: