DB2 Version 9.7 for Linux, UNIX, and Windows

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 9.7 HTML documentation.

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.

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.

Procedure

Results

Depending on the parameters provided, the command lists the following information: