Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,361

    JDBC driver version

    IBM DB2 JDBC Driver Versions - United States

    As per the above link, there is JDBC 3.0 driver​ and JDBC 4.0 driver. What is the difference between 3.0 and 4.0 and how do I know which one I need? What does it depend on?

    I executed "java com.ibm.db2.jcc.DB2Jcc -version" on one of the v9.7 FP5 servers and it returned 3.63.75 (3.0 driver)​. This java command didn't work on the WAS appl server I tried (not sure why?), but based on the size of db2jcc.jar, it's 3.0 as well.

    Just wondering when an application would need 3.0 and when 4.0. ​

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,428
    Quote Originally Posted by db2girl View Post
    What is the difference between 3.0 and 4.0 and how do I know which one I need? What does it depend on?​
    These refer to the level of JDBC API specification implemented by the driver, not the driver version. They differ in the level of functionality available to the Java application using the driver. For example, here's the additions to JDBC 4.0 vs. JDBC 3.0:

    Quote Originally Posted by theinternets
    The major features added in JDBC 4.0 include:

    Auto-loading of JDBC driver class
    Connection management enhancements
    Support for RowId SQL type
    DataSet implementation of SQL using Annotations
    SQL exception handling enhancements
    SQL XML support
    Check also What's New in JDBC 4.0? | Java.net

    Ultimately, it's the application developers who should specify whether they need JDBC 4.0 or 3.0, depending on what features they use.

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,361
    Thanks. They're currently using JDBC 3.0 so I think it will stay the same.

    What we need to do is to "upgrade" this driver from v9.1 to v9.7. Whose job is it to download the Data Server Client Package, DBAs or people who support/manage the applications that is using this driver? What do you think?

    I think it doesn't make sense for me to do it if all I can do is to download and give it (jar files) to them. But I think in the past they got it from the DBA team.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,361
    I checked with the appl team and they have:

    $ java -cp /opt7/WebSphere/db2/db2jcc4.jar com.ibm.db2.jcc.DB2Jcc -version
    IBM Data Server Driver for JDBC and SQLJ 4.12.55

    $ java -cp /opt7/WebSphere/db2/db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version
    IBM DB2 JDBC Universal Driver Architecture 3.62.56

    $ java -cp /opt7/WebSphere/db2/db2jcc_license_cisuz.jar com.ibm.db2.jcc.DB2Jcc -version
    Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.db2.jcc.DB2Jcc
    Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Jcc
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:434)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:6 60)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:6 26)
    Could not find the main class: com.ibm.db2.jcc.DB2Jcc. Program will exit.


    Based on IBM DB2 9.7 Information Center for Linux, UNIX, and Windows,
    db2jcc.jar is for JDBC 3.0 and db2jcc4.jar is for JDBC 4.0. Still need to verify what their CLASSPATH is pointing to (they're saying JDBC 4 came with the bundle). Any other way to check if they're using JDBC 3.0 or JDBC 4.0 other than CLASSPATH?


    But they don't have db2jcc_license_cu.jar in the same dir as db2jcc.jar/db2jcc4.jar and db2jcc_license_cisuz.jar. Is db2jcc_license_cu.jar needed when connecting to DB2 zOS?

  5. #5
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,361
    I'd like to know when the support for JDBC 3.0 driver will end. From the link I pasted earlier, I see that it's supported with DB2 v10. Do you know where I can check about JDBC 3.0 driver support?

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,428
    Quote Originally Posted by db2girl View Post
    I'd like to know when the support for JDBC 3.0 driver will end.
    May be never. JDBC 3.0 is not software version; it's the API specification version, so each newer API version will be a superset of 3.0 up to the point when it becomes impossible to support old version without affecting newer functionality.
    ---
    "It does not work" is not a valid problem statement.

  7. #7
    Join Date
    Nov 2012
    Posts
    6

    Db2jcc vs db2jcc4

    Hye,
    Actually dbjcc4.jar is type 4 driver which allows calls directly to db2 on z/os. Means it doesn't need deployement of db2luw on your application server.
    While db2jcc.a type 2 driver can't do that and requests the datanse thrue adbm conf such as db2 connect on a local serveur or a remote server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •