Listing Db2 database products installed on your system (Linux and UNIX)

On supported Linux® and UNIX operating systems, the db2ls command lists the Db2 database products and features installed on your system, including the Db2 version 11.5 HTML documentation.

Before you begin

At least one Db2 Version 9 (or later) database product must already be installed by a root user for a symbolic link to the db2ls command to be available in the /usr/local/bin directory.

About this task

With the ability to install multiple copies of Db2 database products on your system and the flexibility to install Db2 database products and features in the path of your choice, you need a tool to help you keep track of what is installed and where it is installed. On supported Linux and UNIX operating systems, the db2ls command lists the Db2 products and features installed on your system, including the Db2 HTML documentation.

The db2ls command can be found both in the installation media and in a Db2 install copy on the system. The db2ls command can be run from either location. The db2ls command can be run from the installation media for all products except IBM® Data Server Driver Package.

The db2ls command can be used to list:
  • Where Db2 database products are installed on your system and list the Db2 database product level
  • All or specific Db2 database products and features in a particular installation path


Restrictions

The output that the db2ls command lists is different depending on the ID used:
  • When the db2ls command is run with root authority, only root Db2 installations are queried.
  • When the db2ls command is run with a non-root ID, root Db2 installations and the non-root installation owned by matching non-root ID are queried. Db2 installations owned by other non-root IDs are not queried.

The db2ls command is the only method to query a Db2 database product. You cannot query Db2 database products using Linux or UNIX operating system native utilities, such as pkginfo, rpm, SMIT, or swlist. Any existing scripts containing a native installation utility that you use to query and interface with Db2 installations must change.

You cannot use the db2ls command on Windows operating systems.

Procedure

  • To list the path where Db2 database products are installed on your system and list the Db2 database product level, enter:
    db2ls 
    The command lists the following information for each Db2 database product installed on your system:
    • Installation path
    • Level
    • Fix pack
    • Special Install Number. This column is used by IBM Db2 Support.
    • Installation date. This column shows when the Db2 database product was last modified.
    • Installer UID. This column shows the UID with which the Db2 database product was installed.
  • To list information about Db2 database products or features in a particular installation path the q parameter must be specified:
    db2ls -q -p -b baseInstallDirectory
    where:
    • q specifies that you are querying a product or feature. This parameter is mandatory.
    • p specifies that the listing displays products rather than listing the features.
    • b specifies the installation directory of the product or feature. This parameter is mandatory if you are not running the command from the installation directory.

Results

Depending on the parameters provided, the command lists the following information:
  • Installation path. This is specified only once, not for each feature.
  • The following information is displayed:
    • Response file ID for the installed feature, or if the p option is specified, the response file ID for the installed product. For example, ENTERPRISE_SERVER_EDITION.
    • Feature name, or if the p option is specified, product name.
    • Product version, release, modification level, fix pack level (VRMF). For example, 10.1.0.0
    • Fix pack, if applicable. For example, if Fix Pack 1 is installed, the value displayed is 1. This includes interim fix packs, such as Fix Pack 1a.
  • If any of the product's VRMF information do not match, a warning message displays at the end of the output listing. The message suggests the fix pack to apply.