GET HEALTH SNAPSHOT command
The 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.
Scope
This command is issued on the currently attached member and, by default, returns information only for that member. In the case of multiple members per host, the currently attached member is the first member that is listed in the db2nodes.cfg file on that host.
To issue the command for a specific member that is not the currently attached member, specify the ATTACH_MEMBER parameter. To issue the command for all members and receive an aggregated result, specify the GLOBAL parameter.
To change the currently attached member, issue the SET CLIENT command with the ATTACH_MEMBER parameter . You must issue the DETACH command followed by the ATTACH command from your application for this change to take effect.
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
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 MEMBER member-number
- Returns results for the member specified.
- GLOBAL
- Returns the health monitor status for all members.
- 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
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 members 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 = NormalUsage 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.
Compatibilities
- DBPARTITIONNUM can be substituted for MEMBER, except when the DB2_ENFORCE_MEMBER_SYNTAX registry variable is set to ON.
