DB2 Version 9.7 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. 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. It acts only on that database partition 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 DBPARTITIONNUM--db-partition-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 DBPARTITIONNUM
Specifies the database partition number at which the health indicator has entered an alert state. If a database partition number is not specified and GLOBAL is not specified, the command will return information for the currently connected database partition.
GLOBAL
Retrieves recommendations for the specified health indicator across all database partitions. In cases where the recommendations are the same on different database partitions, those recommendations are returned as a single set of recommendations that solve the health indicator on the affected database partitions.

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 desired utilization rate. 
For example, if your desired 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%).

Take one of the following actions:

Execute the following scripts at the DB2 server:

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


Launch DB2 tool: Database Configuration Window

The Database Configuration window can be used to view and update 
database configuration parameters.

To open the Database Configuration window: 
1.  From the Control Center, expand the object tree until you find 
    the databases folder. 
2.  Click the databases folder. Any existing database are displayed 
    in the contents pane on the right side of the window. 
3.  Right-click the database that you want in the contents pane, and 
    click Configure Parameters in the pop-up menu. The Database 
    Configuration window opens.

On the Performance tab, update the database heap size parameter as 
suggested and click OK to apply the update.


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 on the 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.


Take one of the following actions:

Launch DB2 tool: Memory Visualizer

The Memory Visualizer is used to monitor memory allocation within 
a DB2 instance. It can be used to monitor overall memory usage, and 
to update configuration parameters for individual memory components.

To open the Memory Visualizer: 
1.  From the Control Center, expand the object tree until you find 
    the instances folder. 
2.  Click the instances folder. Any existing instances are displayed 
    in the contents pane on the right side of the window. 
3.  Right-click the instance that you want in the contents pane, and 
    click View Memory Usage in the pop-up menu. The Memory Visualizer 
    opens.

To start the Memory Visualizer from the command line issue the 
db2memvis command.

The Memory Visualizer displays a hierarchical list of memory pools 
for the database manager. Database Heap is listed under the Database 
Manager Memory group for each database. On Windows, it is listed 
under the Database Manager Shared Memory group. 

Click the check box on the Show Plot column for the Database Heap 
row to add the element to the plot.

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.