Montag, 19. Januar 2009

DB2's JDBC and Ubuntu Upgrades

lately, I upgraded my Ubuntu 8.04 LTS to 8.10. All seems to work well except my DB2 Installation.

Problem
When I tried to start DB2 by typing "db2start", I got the following message:

SQL5043N Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully.

And no JDBC Connection where possible anymore. That's kind of a show stopper for a Java developer.

How I found the Solution
First of all, you need more information, so consult the db2diag.log. On my machine it's located under "/home/db2inst1/sqllib/db2dump/db2diag.log". Because there seems to be no information about the error, I increased the loglevel by doing this:

db2 UPDATE DATABASE MANAGER CONFIGURATION USING DIAGLEVEL 4
db2 terminate
db2 force application all
db2stop
db2start

This should change the diaglevel, terminate the connection, kills all connections from other applications and restart.

After this, I saw the following message in the db2diag.log:

MESSAGE : DIA3201E The service name "db2c_db2inst1" specified in the database manager configuration file cannot be found in the TCP/IP services file.

google for that and you'll find, that there is a file called "services" under "/etc" and the TCP/IP connection must be configured in it. I guess, the Ubuntu upgrade has overwritten that one.

Solution
I found this page that describes how to add the needed configuration to "/etc/services". In my case I added the following line:

db2c_db2inst1 50000/tcp # DB2-Port for JDBC

And everything was back to normal :)

Keine Kommentare: