GET RECOMMENDATIONS FOR HEALTH INDICATOR command
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
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 about the database heap, refer to the Db2
documentation.
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
- 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.