DB2 Version 9.7 for Linux, UNIX, and Windows

LIST APPLICATIONS command

Displays to standard output the application program name, authorization ID (user name), application handle, application ID, and database name of all active database applications. This command can also optionally display an application's sequence number, status, status change time, and database path.

Scope

This command only returns information for the database partition on which it is issued.

Authorization

One of the following:
  • SYSADM
  • SYSCTRL
  • SYSMAINT
  • SYSMON

Required connection

Instance. To list applications for a remote instance, it is necessary to first attach to that instance.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-LIST APPLICATIONS--+-----------------------------------+----->
                      '-FOR--+-DATABASE-+--database-alias-'   
                             '-DB-------'                     

>--+----------------------------------------+------------------->
   +-AT DBPARTITIONNUM--db-partition-number-+   
   '-GLOBAL---------------------------------'   

>--+-------------+---------------------------------------------><
   '-SHOW DETAIL-'   

Command parameters

FOR DATABASE database-alias
Information for each application that is connected to the specified database is to be displayed. Database name information is not displayed. If this option is not specified, the command displays the information for each application that is currently connected to any database at the database partition to which the user is currently attached.
The default application information is comprised of the following:
  • Authorization ID
  • Application name
  • Application handle
  • Application ID
  • Database name
  • Number of agents
AT DBPARTITIONNUM db-partition-number
Specifies the database partition for which the status of the monitor switches is to be displayed.
GLOBAL
Returns an aggregate result for all database partitions in a partitioned database environment.
SHOW DETAIL
Some of the additional output information will include:
  • CONNECT Auth ID
  • Sequence number
  • Coordinating DB partition number
  • Coordinator pid or thread
  • Status
  • Status change time
  • Node
  • Database path

If this option is specified, it is recommended that the output be redirected to a file, and that the report be viewed with the help of an editor. The output lines might wrap around when displayed on the screen. When a database is activated by a user other than the database administrator or an user without SYSADM authority the authorization ID will be shown as the non system user.

Examples

To list detailed information about the applications connected to the SAMPLE database, issue:
list applications for database sample show detail

Usage notes

The database administrator can use the output from this command as an aid to problem determination. In addition, this information is required if the database administrator wants to use the GET SNAPSHOT command or the FORCE APPLICATION command in an application.

To list applications at a remote instance (or a different local instance), it is necessary to first attach to that instance. If FOR DATABASE is specified when an attachment exists, and the database resides at an instance which differs from the current attachment, the command will fail.

LIST APPLICATIONS only shows user applications while LIST APPLICATIONS SHOW DETAIL shows all applications including the system applications. Event monitors are an example of system applications. System applications usually appear in snapshot output with application names beginning "db2" (for example, db2stmm, db2taskd). For additional information, see the Related links section about the is_system_appl monitor element.

Compatibilities

For compatibility with versions earlier than Version 8:
  • The keyword NODE can be substituted for DBPARTITIONNUM.