IBM Support

75 ways to demystify DB2: #22: Techtip: Why is db2ilist not listing my instances?

Technical Blog Post


Abstract

75 ways to demystify DB2: #22: Techtip: Why is db2ilist not listing my instances?

Body

DB2 instance is up and running fine, but when issuing 'db2ilist' no output is being returned, what needs to be done?

Step 1: Dump out the registry and validate if you have the instance listed or not

db2greg -dump | grep <instance name>

Step 2: As an instance owner issue db2set and validate if you have the instance name outputted

db2set -l

Step 3: Once you validate the instance entry is in 'db2greg' output and not in 'db2set' ouput, as root, go to <installpath>/instance

cd <installpath>/instance

Tip: you can get the install path by issuing 'db2ls' command.

Step 4: Add the instance profile

./db2iset -a <instancename>

 

Notes: On step 1, if you did not see the instance entry, you should stop there. Depending on the DB2 release, the above fix may not be the only reason why 'db2ilist' would show no output. Another step you can attempt is below.

db2inst1@host:~> db2ilist -d
+ ROOT_GLOBAL_REG_PATH=/var/db2/global.reg
+ '[' -f /opt/ibm/db2/V10.1/global.reg ']'
+ DB2_GLOBAL_REG_PATHNAME=/var/db2/global.reg
+ export DB2_GLOBAL_REG_PATHNAME

 

What the above command does is, it runs 'db2ilist' with debug mode on. If you are on V10.1 and above and have the described issue, then you should attempt running 'db2ilist -d' and see where is your registry values are coming from. If your DB2_GLOBAL_REG_PATHNAME is set to a file other than /var/db2/global.reg, then that would explain why your 'db2ilist' is not listing the entries as it is reading off from wrong path. You can compare the two files and consult with DB2 Support and remove the global.reg file that is NOT in /var/db2 directory.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11141162