DB2 Version 9.7 for Linux, UNIX, and Windows

GET HEALTH SNAPSHOT command

Retrieves the health status information for the database manager and its databases. The information returned represents a snapshot of the health state at the time the command was issued.

Important: This command or API has been deprecated and might be removed in a future release because the health monitor has been deprecated in Version 9.7. For more information, see Health monitor has been deprecated.

Scope

In a partitioned database environment, this command can be invoked from any database partition defined in the db2nodes.cfg file. By default it acts on the database partition from which it was invoked. If you use the GLOBAL option, it will extract consolidated information from all of the database partitions.

Authorization

None

Required connection

Instance. If there is no instance attachment, a default instance attachment is created.

To obtain a snapshot of a remote instance, it is necessary to first attach to that instance.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-GET HEALTH SNAPSHOT FOR-------------------------------------->

>--+-+-DATABASE MANAGER-+-----------------+--------------------->
   | +-DB MANAGER-------+                 |   
   | '-DBM--------------'                 |   
   +-ALL DATABASES------------------------+   
   '-+-ALL----------+--ON--database alias-'   
     +-+-DATABASE-+-+                         
     | '-DB-------' |                         
     '-TABLESPACES--'                         

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

>--+-------------+--+----------------------+-------------------><
   '-SHOW DETAIL-'  '-WITH FULL COLLECTION-'   

Command parameters

DATABASE MANAGER
Provides statistics for the active database manager instance.
ALL DATABASES
Provides health states for all active databases on the current database partition.
ALL ON database-alias
Provides health states and information about all table spaces and buffer pools for a specified database.
DATABASE ON database-alias
TABLESPACES ON database-alias
Provides information about table spaces for a specified database.
AT DBPARTITIONNUM db-partition-number
Returns results for the database partition specified.
GLOBAL
Returns an aggregate result for all database partitions in a partitioned database environment.
SHOW DETAIL
Specifies that the output should include the historical data for each health monitor data element in the form of {(Timestamp, Value, Formula)}, where the bracketed parameters (Timestamp, Value, Formula), will be repeated for each history record that is returned. For example,
    (03-19-2002 13:40:24.138865,50,((1-(4/8))*100)), 
    (03-19-2002 13:40:13.1386300,50,((1-(4/8))*100)), 
    (03-19-2002 13:40:03.1988858,0,((1-(3/3))*100))

Collection object history is returned for all collection objects in ATTENTION or AUTOMATE FAILED state.

The SHOW DETAIL option also provides additional contextual information that can be useful to understanding the value and alert state of the associated Health Indicator. For example, if the table space storage utilization Health Indicator is being used to determine how full the table space is, the rate at which the table space is growing will also be provided by SHOW DETAIL.

WITH FULL COLLECTION
Specifies that full collection information for all collection state-based health indicators is to be returned. This option considers both the name and size filter criteria. If a user requests a health snapshot with full collection, the report will show all tables that meet the name and size criteria in the policy. This can be used to validate which tables will be evaluated in a given refresh cycle. The output returned when this option is specified is for collection objects in NORMAL, AUTOMATED, ATTENTION, or AUTOMATE FAILED state. This option can be specified in conjunction with the SHOW DETAIL option.

Without this option, only tables that have been evaluated for automatic reorganization and require manual intervention (that is, manual reorg or automation failed) will be displayed in a get health snapshot report.

Examples

The following is typical output resulting from a request for database manager information:
D:\>DB2 GET HEALTH SNAPSHOT FOR DBM

             Database Manager Health Snapshot

Node name                                      =
Node type                                      = Enterprise Server Edition 
                                                 with local and remote clients
Instance name                                  = DB2
Snapshot timestamp                             = 02/17/2004 12:39:44.818949

Number of database partitions in DB2 instance  = 1
Start Database Manager timestamp               = 02/17/2004 12:17:21.000119
Instance highest severity alert state          = Normal

Health Indicators:

    Indicator Name                             = db2.db2_op_status
       Value                                   = 0
       Evaluation timestamp                    = 02/17/2004 12:37:23.393000
       Alert state                             = Normal

    Indicator Name                             = db2.sort_privmem_util
       Value                                   = 0
       Unit                                    = %
       Evaluation timestamp                    = 02/17/2004 12:37:23.393000
       Alert state                             = Normal

    Indicator Name                             = db2.mon_heap_util
       Value                                   = 6
       Unit                                    = %
       Evaluation timestamp                    = 02/17/2004 12:37:23.393000
       Alert state                             = Normal

Usage notes

When the GET HEALTH SNAPSHOT command returns a recommendation to reorganize the data or index on a data partitioned table, the recommendation is only at the table level and not specific to any individual partitions of the table. Starting with DB2® Version 9.7 Fix Pack 1, the data or the partitioned indexes of a specific data partition can be reorganized using the REORG INDEXES/TABLE command or the db2Reorg API. To determine if only specific data partitions of a data partitioned table need to be reorganized, use the REORGCHK command to retrieve statistics and reorganization recommendations for the data partitions of the data partitioned table. Use the REORG TABLE or REORG INDEXES ALL command with the ON DATA PARTITION clause to reorganize the data or the partitioned indexes of a specific data partition.