I recently changed the name of a IBM Sametime server, i.e. the hostname
of the (virtual) machine. On the same box runs the IBM DB2 server, which
is used by the system console server and by the proxy server. Everything
runs on top of Microsoft Windows 2008 R2.
After the necessary reboot, DB2 greeted
me with a "SQL1042C An unexpected system error occurred"
and would not start - neither as a service, neither manually. Even the
DB2 command console exited immediately.
In the details of the logs I found a
- more or less - informative message: "SQL1022C There is not
enough memory available to process the command."
But more than 6 GB physical and about
20 GB of logical RAM were free!?!
After a long time and thorough research
I found out that the error message was completely misleading.
DB2 on Windows stores some information
about local users (in the form ServerName\UserName) and the hostname in
the Windows registry, namely under the key HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\InstalledCopies\DB2COPY1\GLOBAL_PROFILE.
(change "DB2COPY1" if your instance has another name).
I should have followed this document
from the start: Changing
hostname of the DB2 server, but
I didn't like the idea to change back the hostname just to do the renaming
the "right" way.
In the blog entry How
do you rename the Windows machine name for a DB2 v9.1.x database?
and its comments I found a faster, easier and more direct way to repair
the DB2 installation:
Since it was an workgroup server edition
(WSE) of DB2, there was no db2nodes.cfg to modifiy.
In a command prompt started as an adminstrator
I executed:
- db2extsec -r
- db2extsec /a DB2ADMNS /u DB2USERS
- db2set -g DB2SYSTEM={NewHostName}
rebooted
the machine and DB2 was up and running once more. Yay!