What is db2prereqcheck?

db2prereqcheck is a tool IBM provides to check for all OS and software prerequisites prior to and during the installation of Db2. It is included with every fixpack and base code that Db2 provides.

When to use db2preqcheck

Use db2prereqcheck after placing Db2 code (base code or a fix pack) on a server, but before running db2_install, db2setup, or installFixPack. db2prereqcheck is not a substitute for other preparation work. It is still critical to make sure you have the right code, read the readme, and all of the other details that go with an install, upgrade, or fix pack update. If installing, upgrading, or updating an HADR cluster, db2prereqcheck should also be run on all standby servers, in addition to the primary server. The install processes also call db2prereqcheck, but if db2prereqcheck fails at that point, then the install itself fails. It is better to know ahead of time, especially if the install process is being run during an outage window. While it may be less time-critical to run db2prereqcheck ahead of time during a new server build, it still provides valuable information like which Linux packages you may need to install prior to installing Db2. It is much cleaner to run it first, before executing your chosen install method.

How to use db2prereqcheck

While db2prereqcheck can be executed with no options, it performs checks for all versions and pureScale if you execute it that way.

Syntax

There are actually a surprisingly large number of options for executing db2prereqcheck. The syntax diagram, minus the pureScale options, looks like this:

>>-db2prereqcheck--+--------------------------+----------------->
                   +- -v--version-------------+
                   '-+-----+--+-------------+-'
                     '- -l-' '-f--xml_file-'   
>--+--------------------------------+--+----------------+------->
   +-c------------------------------+ '-o--output-file-'    
   '- -p--| Db2-pureScale-options |-'   
>--+---+--+---+--+---+-----------------------------------------><  
   '-s-'  +-u-+  '-i-'
          '-g-'

Check out all of the options on the db2prereqcheck page in the IBM Db2 Knowledge Center.

Example Syntax

db2prereqcheck should be executed as root. You must uncompress and untar the Db2 code first. Before executing db2prereqcheck, change directories to the same location as the install executables (often ‘server’ or ‘universal’), like this:

# ls
Db2_Svr_10.5.0.8_AIX.tar   server/
# cd server
# ls
db2/                     db2checkCOL.tar.gz       db2ls*                   installFixPack*
db2_deinstall*           db2checkCOL_readme.txt   db2prereqcheck*          nlpack/
db2_install*             db2ckupgrade*            db2setup*

I would recommend executing db2prereqcheck with very specific syntax to give only the details that are really needed. If, for example, you are installing 10.5, fix pack 8 on a single partition, non-pureScale server, this would be the best syntax:

./db2prereqcheck -v 10.5.0.8 -i

The -v here supplies the target version being installed. The -i tells prereqcheck to skip the pureScale checks.

Sample Output

# ./db2prereqcheck -v 10.5.0.8 -i  ==========================================================================  Checking prerequisites for Db2 installation. Version "10.5.0.8". Operating system "AIX"

Validating "kernel level " ... Required minimum operating system kernel level: "6.1". Actual operating system kernel level: "6.1". Requirement matched.

Validating "AIX technology level and service pack " ... Required minimum technology level: "7" Service pack: "6" Actual technology level: "9" Service pack: "6" Requirement matched.

Validating "Java" ... Requirement matched.

Validating "XL C/C++ Runtime" ... Required minimum "XL C/C++ Runtime" level: "12.1.0.0" Actual version: "13.1.2.0" Requirement matched.

DBT3533I The db2prereqcheck utility has confirmed that all installation prerequisites were met.

You might also like:

Want to learn how to adjust the row size in a table in Db2? Check out this post!

Share This