cancel
Showing results for 
Search instead for 
Did you mean: 

Data Servers: Connection to DB2 9.5 fails

Former Member
0 Kudos

Hello everybody,

I am trying to establish a connection to a IBM DB2 9.5 database on a xMII 12.0 installation.

I never had so much trouble getting this job done. The error message in the NetWeaver

logs is just "Unable to create connection to database for MSC_DB2_TEST" - nothing more.

JDBC

+ Deployed driver = db2jcc.jar (from DB2 9.5)

IDBC Connector

+ Name: MSC_DB2_TEST

+ JDBCDriver = com.ibm.db2.jdbc.app.DB2Driver

+ ServerURL = jdbc:db2://host:1234/dbname

+ Valid user name and passwort

Any suggestions? Is there a way to get some useful error logs?

Best regards,

Martin

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

@Michael Appleby: It is Version 12.0.5 Build(126).

jamie_cawley
Advisor
Advisor
0 Kudos

Doesn't that driver require a license for it and maybe sqlj.jar? Is the jtopen driver a possibilty for your scenario?

Jamie

Former Member
0 Kudos

@Jamie Cawley: I added some more .jars and .zip comming with DB2, 1st the db2jcc_license_cu.jar to solve a potential license problem you mentioned. No success. I used the db2java.zip instead. No success. Finally I simply added all the .jars and .zips I found. No success.

Using another driver like jtopen is possible in our development environment, but not in productive installations of our customers. They insist that we use the official driver from IBM.

Isn't there a way to get useful error messages?

jamie_cawley
Advisor
Advisor
0 Kudos

Zipping them up together will not work, you need to import each one seperately. Try setting the MII logs to debug and/or looking on the database for an error.

Are you sure that your driver classpath is correct?

Try

com.ibm.db2.jcc.DB2Binder

Jamie

Former Member
0 Kudos

@Jamie Cawley: Thanks for your JDBCDriver hint. Now the database gets connected. The configuration is:

JDBC (JARs from DB2 9.5)

+ db2jcc.jar --> type 4 (pure Java) JDBC 3.0 driver

+ db2jcc_license_cu.jar --> license for the driver

IDBC Connector

+ JDBCDriver = com.ibm.db2.jcc._DB2Driver_

+ ServerURL = jdbc:db2://host:1234/dbname

+ Valid user name and passwort

+ ValidationQuery = SELECT CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1

Regards,

Martin

agentry_src
Active Contributor
0 Kudos

What version and build of 12.0?