DB2 - check if product installed on Solaris/AIX/HPUX

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pwu@qantas.com.au

    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.
  • Saurabh.Nr@gmail.com

    #2
    Re: DB2 - check if product installed on Solaris/AIX/HPUX

    On Oct 10, 11: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.
    you can write a script using db2ls and db2level ...command

    Comment

    • Christian Tanner

      #3
      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@p1 0g2000prf.googl egroups.com...
      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.

      Comment

      • stefan.albert

        #4
        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:
        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.

        Comment

        • Darin McBride

          #5
          Re: DB2 - check if product installed on Solaris/AIX/HPUX

          pwu@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.
          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).

          Comment

          Working...