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 12.1 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
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.
- 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
- 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
Results
- 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.