Verifying the system & other requirements before installing a software is very important rather going ahead with Installation and failing at various levels.
db2prereqcheck is one such tool developed to verify the prerequisites on the systems before attempting a DB2 installation.
This would be a best practice and could be applicable across various products/technologies .
db2prereqcheck command without any options checks for prerequisites for all versions of DB2 mentioned in the xml file.
db2prereqcheck -? gives the help and different options for the command.
Few Examples of running db2prereqcheck command:
1. To check whether the system meets the basic pureScale prerequisites for a specific DB2 version, issue the following command(Linux/Unix):
$ ./db2prereqcheck -p -v 10.5.0.0 -hl <host1,host2..> -dl <shared_disk1,shared_disk2..> -iu <user>
2. To check whether the system meets the comprehensive pureScale prerequisites for a specific type of network configuration (Linux operating systems only) and for a specific DB2 version, issue the following command (Linux/Unix)::
$ ./db2prereqcheck -p -v 10.5.0.0 -hl <host1,host2..> -dl <shared_disk1,shared_disk2..> -iu <user> -nl <netname1,netname2..>
3. To redirect the db2prereqchekc output use -o option as below:
./db2prereqcheck -p -v 10.5.0.0 -o <logfilename>
4. To get the detailed debug version of output from db2prereqcheck use -d option.
./db2prereqcheck -p -v 10.5.0.0 -d -o <logfilename>
db2prereqcheck tool on Windows:
On windows the db2prereqcheck tool will verify if a particular DB2 release and version is supported on the OS on which it is run.
There is a xml file named DB2prereqs.xml maintained in the image location which stores the DB2 release and version information.
Usage:From 10.5fp4 onwards there is no prerequisites required to run db2prereqcheck tool on Windows.
User can just download the image and run db2prereqcheck from the image directly.
db2prereqcheck tool for Linux/UNIX:
On Linux/UNIX db2prereqcheck checks for prerequisites to install DB2 with no pureScale feature and with pureScale feature(on Linux and AIX only).
Common validation includes OS version, kernel version, general libraries. PureScale validations include space, ksh,ntp, Adapaters, Java etc.
Usage: db2prereqcheck command can be run from the image/server location.
Common errors\warnings with db2prereqcheck and the solutions.
1. Prior to V10.5 Fixpack4, db2prereqcheck was dependent on the Microsoft VC++ redistributables on the machine.
If the VC++ redistibutables are not present on the machine db2prereqcheck execution fails with error as below.
For the DB2 version 10.1 product, the db2prereqcheck tool displays "Could not load the resource library C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\\db2istring_v101.dll" error when the MSVCR100.dll file is missing in the system.
For the DB2 version 10.5 product, the db2prereqcheck tool displays "Could not load the resource library C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\\db2istring_v105.dll" error when the MSVCR110.dll file is missing in the system.
Resolution is to install the below packages and launch db2prereqcheck from image location again.
For the DB2 V10.1 product, install Microsoft Visual C++ redistributable package for VS2010, which contains the MSVCR100.dll file.
For the DB2 V10.5 product, install Microsoft Visual C++ redistributable package for VS2012, which contains the MSVCR110.dll file.
1. During the DB2 installation (Linux and AIX) db2prereqcheck will be called multiple times and the output of each call will be appended to the /tmp/db2prereqcheckOut.log file.
Resolution : The last entry has to be considered to determine the exact failure.
2. If there are any major errors with db2prerqcheck run during installation , "-f sysreq" option can be used to skip the hard fail and continue with the installation.
Post installation the errors can be rectified.
3. If db2prereqcheck fails to execute on remote hosts with -hl option when run on IIH , Check if the ssh and scp copy command works properly on the remote host.
4. A 32 bit libpam.so is present on the machine and still db2prereqcheck fails with Waring that libpam.so not found upon setting a particular locale.
Resolution is to manually verify if libpam.so is present and ignore the Warning message. The issue is fixed in later fixpacks.