DB2 10.5 for Linux, UNIX, and Windows

GET RECOMMENDATIONS FOR HEALTH INDICATOR command

Returns descriptions of recommendations for improving the health of the aspect of the database system that is monitored by the specified health indicator. Recommendations can be returned for a health indicator that is in an alert state on a specific object, or the full set of recommendations for a given health indicator can be queried.
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. It is not supported in DB2® pureScale® environments. For more information, see Health monitor has been deprecated..

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.

In a partitioned database or DB2 pureScale environment, this command can be invoked from any member defined in the db2nodes.cfg file. It acts only on that member unless the GLOBAL parameter is specified.

Authorization

None

Required connection

Instance. If there is no instance attachment, a default instance attachment is created. To retrieve recommendations for a remote instance, it is necessary to first attach to that instance.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-GET RECOMMENDATIONS FOR HEALTH INDICATOR--health-indicator-name-->

>--+-----------------------------------------------------------------------------------------+-->
   '-FOR--+-DBM----------------------------------------------------------------------------+-'   
          '-+-TABLESPACE--tblspacename-------------------------------+--ON--database-alias-'     
            +-CONTAINER--containername--FOR TABLESPACE--tblspacename-+                           
            '-DATABASE-----------------------------------------------'                           

>--+--------------------------+--------------------------------><
   +-AT MEMBER--member-number-+   
   '-GLOBAL-------------------'   

Command parameters

HEALTH INDICATOR health-indicator-name
The name of the health indicator for which you would like to retrieve the recommendations. Health indicator names consist of a two- or three-letter object identifier followed by a name that describes what the indicator measures.
DBM
Returns recommendations for a database manager health indicator that has entered an alert state.
TABLESPACE tblspacename
Returns recommendation for a health indicator that has entered an alert state on the specified table space and database.
CONTAINER containername
Returns recommendation for a health indicator that has entered an alert state on the specified container in the specified table space and database.
DATABASE
Returns recommendations for a health indicator that has entered an alert state on the specified database.
ON database-alias
Specifies a database.
AT MEMBER member-number
Specifies the member number at which the health indicator has entered an alert state. If a member number is not specified and GLOBAL is not specified, the command will return information for the currently connected member.
GLOBAL
Retrieves recommendations for the specified health indicator across all members. In cases where the recommendations are the same on different members, those recommendations are returned as a single set of recommendations that solve the health indicator on the affected members.

Examples

   db2 get recommendations for health indicator db.db_heap_util 
    for database on sample

Problem:

    Indicator Name                             = db.db_heap_util
       Value                                   = 42
       Evaluation timestamp                    = 11/25/2003 19:04:54
       Alert state                             = Alarm
       Additional information                  = 

Recommendations:

Recommendation: Increase the database heap size.
Rank: 1

Increase the database configuration parameter dbheap sufficiently 
to move utilization to normal operating levels. To increase the 
value, set the new value of dbheap to be equal to 
(pool_cur_size / (4096*U)) where U is the required utilization rate. 
For example, if your required utilization rate is 60% of the warning 
threshold level, which you have set at 75%, then 
U = 0.6 * 0.75 = 0.45 (or 45%).

Execute the following commands at the DB2 server:

CONNECT TO SAMPLE;
UPDATE DB CFG USING DBHEAP 149333;
CONNECT_RESET;

Recommendation: Investigate memory usage of database heap.
Rank: 2

There is one database heap per database and the database manager uses 
it on behalf of all applications connected to the database. The data 
area is expanded as needed up to the maximum specified by dbheap.

For more information aboutthe database heap, refer to the DB2 
Information Center.

Investigate the amount of memory that was used for the database heap 
over time to determine the most appropriate value for the database 
heap configuration parameter. The database system monitor tracks the 
highest amount of memory that was used for the database heap.

Usage notes

The GET RECOMMENDATIONS FOR HEALTH INDICATOR command can be used in two different ways:
  • Specify only the health indicator to get an informational list of all possible recommendations. If no object is specified, the command will return a full listing of all recommendations that can be used to resolve an alert on the given health indicator.
  • Specify an object to resolve a specific alert on that object. If an object (for example, a database or a table space) is specified, the recommendations returned will be specific to an alert on the object identified. In this case, the recommendations will be more specific and will contain more information about resolving the alert. If the health indicator identified is not in an alert state on the specified object, no recommendations will be returned.

When the GET RECOMMENDATIONS FOR HEALTH INDICATOR 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 data 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.