Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Overview

DB2 is a commercial database from IBM. The DB2 database software is availble from IBM at:
http://www.ibm.com/software/data/db2/

Obtaining the Driver

A JDBC DB2 driver is included in the DB2 software in the java subdirectory after DB2 installation has been performed. The file db2java.zip should be copied to a location that is accessible from the uPortal build environment (for example, /usr/local/java/db2/lib/db2jdbc.zip).

See Issues section about possible issues using this driver.

Properties Configuration

The uPortal build.properties may need to be modifed. Find the property called jdbcDriver and change it to point to the DB2 jar file, for example:

...

Code Block
    <!-- JDBC Properties -->
    <driver>org.hsqldb.jdbcDriver</driver>
    <url>jdbc:db2://localhost/uportal</url>
    <logonid>sa</logonid>
    <logonpassword></logonpassword>,
    <uidquery>SELECT FIRST_NAME||' '||LAST_NAME AS FIRST_LAST,
    FIRST_NAME, LAST_NAME, EMAIL FROM UP_PERSON_DIR WHERE USER_NAME=?></uidquery> 

Loading the Database

Loading the database requires a couple of steps

  • Create the database: Refer to the DB2 database documentation for instructions regarding how to create an DB2 database instance. DB2 uses a properties file for describing and tuning the database. The properties in that file will need to match definitions in the rdbm.properties file.
  • Create the tables and populate the database: From the uPortal build directory, run "ant db" to execute the ant target which loads the database. The ant target uses the Dbloader tool.

Additional Notes

Issues and Known Bugs

Some people have encountered problems with database drivers with certain web application environments if the classes zip file is used as-is with the .zip file extension. Simply renaming the file to a .jar file seems to fix the problem. Alternatively, unzipping the classes file into a directory structure, then using the jar command to repackage the classes into a jar file works as well.