This email address is being protected from spambots. You need JavaScript enabled to view it.

The cause of the problem

After installing DB2 on a Windows 2008 server any user that is not a member of the DB2ADMNS group will receive a pop-up error message box after login similar to the one shown below.

TWS-DB2 SQL5005C

This is caused by the default setting of DB2 attempting to start the DB2 system tray utility, which fails to start on Windows 2008 for users not in the DB2ADMNS group due to those users not having access to the DB2 files. Various entries on the IBM support site suggest disabling UAC (which I consider a bit drastic) or right-clicking the DB2 icon in the system tray and clearing the "Launch at start-up" option (as the icon in not present you can't do this!) or adding every user with the problem to the DB2ADMNS group (I'm not sure that many DB2 DBAs would agree with this solution either).

The actual problem occurs because the autostart is placed in the registry key for "all users" and consequently every user login attempts to start the DB2 system tray utility. You can resolve this by deleting the offending registry key, but this would mean that it doesn't get started for the db2admin user, or the Administrator user or (in our case) the twsuser user. "No big deal" you might say, but some people (non-DBAs particularly) would like to see the icon in the system tray as that is how they have always stopped/started DB2 or started the DB2 Control Center.

So whichever option you prefer, follow the instructions below to resolve the problem and remove this annoying error when users login.

Determine the DB2 instance name

All of the commands in this section must be executed from an Administrator Command Prompt -  right-click on the Command Prompt short-cut and choose "Run as Administrator", then reply "Yes" to the prompt.

The default instance name for DB2 is "DB2COPY1" if installed during the installation of DB2. To verify the that is the name being used, execute the command shown below.

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

This will display a list similar to the one shown below - the DB2 instance name is highlighted in orange

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    VMware Tools    REG_SZ    "C:\Program Files\VMware\VMware Tools\VMwareTray.exe"
    VMware User Process    REG_SZ    "C:\Program Files\VMware\VMware Tools\VMwareUser.exe"
    DB2COPY1 - db2systray.exe DB2    REG_SZ    C:\PROGRA~1\IBM\SQLLIB\BIN\db2systray.exe DB2

Remove the error for all users

Before doing anything, backup the registry hive so that it can be restored if necessary using the command below - replace the file path/name (in red) as necessary

reg export HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run C:\Temp\DB2sql_saved.reg

To remove the start-up of the DB2 tray icon for all users on Windows 2008 issue the command below - replace the DB2 instance name with the value from above.

reg delete HKLM\SOFTWARE\Microsoft\Windows\Current\Version\Run /v "DB2COPY1 - db2systray.exe DB2" /f

Execute the command below to verify that it has been successfully removed.

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

and check the DB2 instance entry has been removed as shown below.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    VMware Tools    REG_SZ    "C:\Program Files\VMware\VMware Tools\VMwareTray.exe"
    VMware User Process    REG_SZ    "C:\Program Files\VMware\VMware Tools\VMwareUser.exe"

If you do not want the DB2 system tray icon to start for any users, you are done. Otherwise continue with the next step.

Optionally add the start for selected users

To add the start of the DB2 system tray icon for selected users, take the following action for EACH user, but first take a copy of the file containing the exported registry data (e.g C:\Temp\DB2sql_saved.reg) to another file (e.g. C:\Temp\DB2sql_user.reg). The contents of this file will look similar to that shown below

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"VMware Tools"=""C:\Program Files\VMware\VMware Tools\VMwareTray.exe""
"VMware User Process"=""C:\Program Files\VMware\VMware Tools\VMwareUser.exe""
"DB2COPY1 - db2systray.exe DB2"="C:\PROGRA~1\IBM\SQLLIB\BIN\db2systray.exe DB2"

Using the copy of the file (e.g. C:\Temp\DB2sql_user.reg), edit the file so that only the lines shown in the sample below remain - note that the HKEY line has been updated to the current user registry key.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"DB2COPY1 - db2systray.exe DB2"="C:\PROGRA~1\IBM\SQLLIB\BIN\db2systray.exe DB2"

Take the actions listed below to add the autostart for the selected user.

  • Add the user to the group DB2ADMNS to ensure they have the required access to the DB2 files
  • Login as the selected user (e.g. twsuser) wishing to start the DB2 system tray icon automatically at login
  • Execute the command below to add the autostart for the user currently logged in (e.g. twsuser)
reg import DB2sql_user.reg

If you later uninstall DB2 you will need to remove the autostart for each user individually as follows

  • Login as the selected user (e.g. twsuser) wishing to start the DB2 system tray icon automatically at login
  • Execute the command below to add the autostart for the user currently logged in (e.g. twsuser)
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v "DB2COPY1 - db2systray.exe DB2" /f

Twitter Feed

OrbData RT @Ronald_vanLoon: [news] @IBM Project EventStore : 1 million ingestions per minute and real time analytics! #BigData #IbmML https://t.co/
3hreplyretweetfavorite
OrbData This week the @IBMMiddlewareUC put the spotlight on Orb Data's #IBM champion Pete Meechan. https://t.co/wORYKTE8DV

Address

Address:
100 Longwater Avenue, Green Park, Reading, RG2 6GP, U.K.
Tel:
+44 (0) 118 945 0130
E-Mail:
This email address is being protected from spambots. You need JavaScript enabled to view it.

markerFind on Google Maps

About Us

Orb Data brings together People, Process and Technology to deliver the cornerstone of business success: the management of IT infrastructure. At our heart are our people. We have unrivalled experience, helping us to achieve an enviable reputation for excellence in project delivery. Because we’re independent, we identify actual issues and help organisations resolve them –from spec to deployment, and beyond –providing the right solution in terms of best of breed technology and support. We offer a refreshingly simple approach to the way we conduct business. We take pride in our abilities to provide first class solutions to business problems, and to conduct working relationships with honesty and integrity.

Follow Us On:

JoomShaper