Health recommendation queries with SQL

Recommendations can be queried with SQL using the SYSPROC.HEALTH_HI_REC stored procedure.

When using the SYSPROC.HEALTH_HI_REC stored procedure, recommendations are returned in an XML document that is:
  • Formatted according to the health recommendations XML schema DB2RecommendationSchema.xsd located in the sqllib\misc directory.
  • Encoded in UTF-8 and contains text in the client language.
  • Organized as a collection of recommendation sets, where each recommendation set describes a problem (health indicator) being resolved and contains one or more recommendations to resolve that health indicator. Refer to the schema definition for specific details about information that can be retrieved from the document.
All information available through the CLP is also available in the XML recommendation document that is returned when you query with SQL.
The SYSPROC.HEALTH_HI_REC stored procedure takes the following arguments:
  • A health indicator
  • A definition of the object on which the health indicator has entered an alert state
The output recommendation document is returned as a BLOB. Therefore, it is not helpful to work with this stored procedure from the command line, since the CLP will limit the amount of output displayed. It is recommended that this stored procedure be invoked using a high level language (such as C or Java™) that allows the returned XML document to be properly parsed to retrieve any required elements and attributes.