Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 10th, 2008, 07:45 AM
pwu@qantas.com.au
Guest
 
Posts: n/a
Default DB2 - check if product installed on Solaris/AIX/HPUX

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.
  #2  
Old October 10th, 2008, 10:05 AM
Saurabh.Nr@gmail.com
Guest
 
Posts: n/a
Default Re: DB2 - check if product installed on Solaris/AIX/HPUX

On Oct 10, 11:37*am, p...@qantas.com.au wrote:
Quote:
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.
you can write a script using db2ls and db2level ...command
  #3  
Old October 10th, 2008, 10:35 AM
Christian Tanner
Guest
 
Posts: n/a
Default Re: DB2 - check if product installed on Solaris/AIX/HPUX

DB2 v9 is default installed in /opt, older version may have a default
install in /usr. You might have a custom install directory.
you might check these directories for the occurence of the file db2level

find /opt /usr -name db2level -print
/opt/IBM/db2/V9.5/bin/db2level
/usr/opt/db2_08_01/bin/db2level
/usr/opt/db2_08_01/bin64/db2level
/usr/opt/db2_08_01/das/bin/db2level
/usr/opt/db2_08_01/das/bin64/db2level

this shows i have v9.5 and v8.1 db2 products installed on my AIX machine



<pwu@qantas.com.auwrote in message
news:bc0ef6aa-0f02-4531-b6fd-f5f048be399b@p10g2000prf.googlegroups.com...
Quote:
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.
  #4  
Old October 10th, 2008, 04:45 PM
stefan.albert
Guest
 
Posts: n/a
Default Re: DB2 - check if product installed on Solaris/AIX/HPUX

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:
Quote:
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.
  #5  
Old October 10th, 2008, 08:55 PM
Darin McBride
Guest
 
Posts: n/a
Default Re: DB2 - check if product installed on Solaris/AIX/HPUX

pwu@qantas.com.au wrote:
Quote:
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.
The way as defined by IBM:

/usr/local/bin/db2ls -c

This will give you an output that should be relatively easily parsed by
code. If db2ls is not found, then DB2 9 or later is not installed (or at
least, not installed properly).
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles