Skip to main content

DB2

The JDBC 4 driver for DB2 contains a reference to pdq.jar. This casuses a FileNotFoundException to be thrown when loading the driver in Apache Tomcat. The solutions offered by IBM Support are to either:

  1. Manually modify the MANIFEST.MF file in the JAR to remove the Class-Path: pdq.jar line
  2. Update Tomcatโ€™s context.xml to include the following:
<Context>
<!-- ... -->
<JarScanner scanClassPath="false" />
<!-- ... -->
</Context>

Note that this is not a surgical change and will impact all class path scanning.

Open Connectionsโ€‹

A few options:

  • From the command line:
    db2 list applications
  • As a query:
    SELECT * FROM sysibmadm.applications;
    The schema changed from sysibm to sysibmadm in DB2 v8.

Useful links:

Gotchasโ€‹

  • DB2โ€™s isolation level is set through the whole query. When doing a UNION or subselect, you cannot specify WITH UR within the middle of the statement; it must be put at the end.

    Wrong:

    SELECT * FROM foo WITH UR
    UNION
    SELECT * FROM bar WITH UR
    ORDER BY id

    Correct:

    SELECT * FROM foo
    UNION
    SELECT * FROM bar
    ORDER BY id
    WITH UR