DB2 Version 9.7 for Linux, UNIX, and Windows

LIST ACTIVE DATABASES command

Displays a subset of the information listed by the GET SNAPSHOT FOR ALL DATABASES command. An active database is available for connection and use by any application. For each active database, this command displays the following:
  • Database name
  • Number of applications currently connected to the database
  • Database path.

Scope

This command can be issued from any database partition that is listed in $HOME/sqllib/db2nodes.cfg. It returns the same information from any of these database partitions.

Authorization

One of the following:
  • sysadm
  • sysctrl
  • sysmaint
  • sysmon

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-LIST ACTIVE DATABASES---------------------------------------->

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

Command parameters

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 nodes in a partitioned database environment.

Examples

Following is sample output from the LIST ACTIVE DATABASES command:

                           Active Databases

Database name                              = TEST
Applications connected currently           = 0
Database path                              = /home/smith/smith/NODE0000/SQL00002/

Database name                              = SAMPLE
Applications connected currently           = 1
Database path                              = /home/smith/smith/NODE0000/SQL00001/

Compatibilities

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