Page 1 of 1

Need help connecting to an IBM iSeries DB2

Posted: Fri Jan 15, 2010 5:29 pm
by VinnyV88
Hello,

I am new to oxygen and I am trying to configure a database connection to my iseries db2. I downloaded the drivers (db2jcc.jar and db2jcc4.jar) recommended in the documentation and added them to a new DB2 data source. Now, I am trying to configure a new connection, how do I determine what the URL should be? I tried to mimic what is in the documentation, but I keep getting an invalid url error message.
com.ibm.db2.jcc.am.io: [jcc][10165][10045][3.57.82] Invalid database URL syntax: jdbc:db2://191.169.11.5:5000;. ERRORCODE=-4461, SQLSTATE=42815
[jcc][10165][10045][3.57.82] Invalid database URL syntax: jdbc:db2://191.169.11.5:5000;. ERRORCODE=-4461, SQLSTATE=42815

Re: Need help connecting to an IBM iSeries DB2

Posted: Fri Jan 15, 2010 6:25 pm
by adrian
Hello,

Your url jdbc:db2://191.169.11.5:5000; is missing the database.
It should look like this:

Code: Select all

jdbc:db2://[host]:[port]/[database]
Regards,
Adrian

Later Edit: I forgot to mention, the DB2 installation usually comes with a sample database, so your URL for that would be:

Code: Select all

jdbc:db2://191.169.11.5:5000/SAMPLE

Re: Need help connecting to an IBM iSeries DB2

Posted: Fri Jan 15, 2010 6:40 pm
by VinnyV88
Thank you for the response.

Now I'm getting a message that the driver I'm trying to use is not licensed...
com.ibm.db2.jcc.am.io: [jcc][t4][10109][10354][3.57.82] The version of the IBM Universal JDBC driver in use is not licensed for connectivity to QAS databases.
To connect to this server, please obtain a licensed copy of the IBM DB2 Universal Driver for JDBC and SQLJ.
An appropriate license file db2jcc_license_*.jar for this target platform must be installed to the application class path.
Connectivity to QAS databases is enabled by any of the following license files: [ db2jcc_license_cisuz.jar ]. ERRORCODE=-4472, SQLSTATE=42968

Is there a way around this, I'm able to connect to my iseries db through other programs without having to use this driver. Can I connect via an ODBC driver?

Thanks,
Vincent

Re: Need help connecting to an IBM iSeries DB2

Posted: Tue Jan 19, 2010 11:25 am
by adrian
I believe you didn't add all the necessary jars when you created the data source. Make sure you have added all 3 jars:
* db2jcc.jar
* db2jcc_license_cisuz.jar
* db2jcc_license_cu.jar

You can find more info about the DB2 configuration of data sources and connections in Oxygen here:
http://www.oxygenxml.com/IBM_DB2_XML_support.html

It is preferable to use the specific DB2 driver to the JDBC-ODBC.

Regards,
Adrian