Envisn's IBM Cognos Blog

Configuring IBM Cognos BI with a DB2 Express-C Content Store

Written by The Envisn Team | July 30, 2010

by Eugene Marcotte - Envisn, Inc.
We recently got a new development machine for working on NetVisn. Since it was a completely fresh environment, I decided to try something new for the Cognos installation. After searching around it seems like the only relatively simple (and free) choice for a Content Store is to use the DB2 Express-C, since MySQL and other common databases are not supported.

The download is fairly easy to find on the IBM site, http://www-01.ibm.com/software/data/db2/express/. It installs easily, and I choose pretty much all the defaults. Once installed, make sure the service is running and start up the DB2 Control Center. I used “Advanced mode.” Add a new database to your instance by right clicking “All Databases” and choosing Create Database > Standard.

I mostly used the default settings. I did change the storage path, but you could probably leave that the default. There is one important change on the “Region” settings to set the code page to “UTF8.”

Now we need to configure table spaces. To do this, we first need some buffer pools. We will make two buffer pools. Right click on buffer pools under the database.

Name the first 32K Pool and set it to use “32” as the page size:

Make another pool and use “4” as the page size. Name it 4K pool.

Now we need to make three table spaces with the buffers. One “system temporary” and one “user temporary” as well as a “regular.” The first we'll make is the system temporary. Right click table spaces and choose create. Name the first “32K Sys temp,” choose “System temporary” as the type. Choose the 32k buffer pool we created. Choose the table size and tuning options you think are appropriate for your environment. I'm using this on a single user development machine so I picked the smallest settings available.

Create another table space, named “4K User temp” choose our 4K Buffer pool, and the “user temporary” type. Finally, create a table space named “4K Regular” using the 4k buffer pool and the “regular” type.

The last step is to set up permissions. Right click the database and choose “Authorities.” Add the user you want Cognos to connect as. I end up giving all the permissions to the database, for simplicity.

Now, using Cognos Configuration add a content manager resource using the DB2 type, point it at the server where you installed DB2 and use the account and database you configured previously. At this point, when I tested the connection I got an error. Cognos could not find the database driver:

Content manager failed to start because it could not load driver "COM.ibm.db2.jdbc.app.DB2driver".

This is covered in the installation guide. Basically you just need to copy the JDBC driver from DB2 into Cognos. Copy “db2jcc.jar” and “db2jcc_license_cu.jar” from your db2 installation (C:\Program Files\IBM\SQLLIB\java) and into your cognos\webapps\p2pd\WEB-INF\lib directory.

After doing that Cognos starts up and works as usual. Keep in mind, DB2 Express-C has little or no support, other than online communities. Additionally, it is fairly hard to find references to it with respect to Cognos. You take your life in your own hands, but it’s free and “relatively” simple to get running.

© Envisn, Inc., All rights reserved.

Download the Content Store Survival Guide™