(Un)common but potentially mind-twisting DB2 issues

Posted on Wed 18 January 2006 in Databases

It is perhaps a sad reflection on my life that I'm using a personal blog to offer technical information about a product that I work on, rather than telling you about what I ate last night (spinach and goat cheese salad with a raspberry vinaigrette dressing, quinoa, and a rather tomatoey coq au vin), how the weather is (freezing rain and snow last night), or the last time we got together with friends (Peter and Deb came over last night for a lovely visit over wine and dinner).

Instead, here are a few gotchas for DB2 on Linux that might otherwise take you a few hours to figure out.

Shiny new DB2 for Linux (2.6 kernel) requires compat RPMs?

DB2 for Linux Version 8.2 (aka Version 8.1 FixPak 7) has been validated on distributions running both 2.4 and 2.6 Linux kernels. However, starting with FixPak 9 (aka Version 8.2.2, which has replaced Version 8.2 if you order a brand new copy of DB2 with physical media today), you have to choose a 2.4 or 2.6 kernel-specific version of DB2 on the x86 and x86-64 architectures.

If you're unlucky, you might find that once you install this newer version of DB2 meant for a shiny new distribution running a 2.6 Linux kernel, DB2 suddenly stops running and complains that it can't find the libstdc++.so.5 library. The reason is because the new versions of DB2 are built for compatibility with the first enterprise Linux distribution that offered the 2.6 kernel -- SLES 9 -- and guess what level of libstdc++ SLES 9 comes with? Yeah, you guessed right. And the reason the older versions of DB2 don't need libstdc++ is because they shipped with their own copy of the Intel C++ libraries.

Fun stuff eh? The moral of the story is: install your compat-libstdc++ libraries (or whatever they're called), and you won't get hurt when you upgrade DB2.

DB2 for Linux on POWER aka PPC64 aka pSeries: searching for libibmc++

Here's another missing library problem for which Google turned up no help... After installing DB2 for Linux on POWER, the user tried to run any DB2 command and received the following error message:

db2: error while loading shared libraries: libibmc++.so.1:   cannot open shared object file: No such file or directory

The problem occurs because DB2 for Linux on POWER is compiled against the IBM XL C++ libraries. This means that you have to install the IBM XL C/C++ Advanced Edition V7.0 for Linux Runtime Environment as described in a DB2 technote.

DB2