I can only speak for AIX - but it might work for HP-UX and Solaris
also...
In the directory /var/db2 (if it exists - if not DB2 should not be
installed)
you'll find a file named "global.reg "
It contains all informations about installed software and instances.
It is a binary file - so a bit hard to get informations from...
First of all: If it exists, this is an indicator that DB2 is installed
- or was installed.
You can use "strings" to look for pathnames in this file and parse
them and check if it contains a subdirectory "bin" and a program
"db2ilist" or "db2greg". The last one gives readable output for the /
var/db2/global.reg
This you can use to obtain the software installed (might be deleted)
and the instances with their software level.
The informations about instances should be actual, the ones about
installed software not - we delete manually "old" fixpack versions and
so they stay in this file. Check the directories if they are
populated.
Keep in mind, that you can have several versions of DB2 and fixpack
levels installed and active.
For each instance you'll find the level inside /var/db2/global.reg
On Oct 10, 8:37*am, p...@qantas.com .au wrote:
Hi,
I am doing an automated scan of a large number of UNIX machines which
can be Solaris, AIX or HPUX.
I want to find out for a machine via a script if:
1) DB2 is installed?
2) If installed what version is installed
What file/process/user can I check to achieve this?
Thanks for any help.