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.
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.
None
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.
>>-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---------------------------------'
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.
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.