DB2 Version 9.7 for Linux, UNIX, and Windows

HEALTH_HI_REC procedure

Retrieves a set of recommendations that address a health indicator in alert state on a particular DB2® object. Recommendations are returned in an XML document that contains information about actions that can be taken (for example, scripts that can be run) to resolve the alert state.

Important: This procedure 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.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-HEALTH_HI_REC--(--schema-version--,--indicator-id--,--------->

>--dbname--,--object-type--,--object-name--,-------------------->

>--dbpartitionnum--,--client-locale--,--recommendation-doc--)--><

The schema is SYSPROC.

Any scripts that are returned by this procedure must be invoked from the instance on which the health indicator entered the alert state.

If the specified health indicator on the identified object is not in an alert state, an error is returned (SQLSTATE 5U0ZZ).

Procedure parameters

schema-version
An input argument of type INTEGER that specifies the version ID of the schema used to represent the XML document. The recommendation document will only contain elements and attributes that were defined for that schema version. Valid schema versions are defined in db2ApiDf.h, located in the include subdirectory of the sqllib directory.
indicator-id
An input argument of type INTEGER that specifies the numeric identifier of the health indicator for which recommendations are being requested. Valid health indicator IDs are defined in sqlmon.h, located in the include subdirectory of the sqllib directory.
dbname
An input argument of type VARCHAR(255) that specifies an alias name for the database against which the health indicator entered an alert state, and when object type is either DB2HEALTH_OBJTYPE_TS_CONTAINER, DB2HEALTH_OBJTYPE_TABLESPACE, or DB2HEALTH_OBJTYPE_DATABASE. Specify NULL otherwise.
object-type
An input argument of type INTEGER that specifies the type of object on which the health indicator entered an alert state. Valid object types are defined in sqlmon.h, located in the include subdirectory of the sqllib directory.
object-name
An input argument of type VARCHAR(255) that specifies the name of a table space or table space container when the object type is set to DB2HEALTH_OBJTYPE_TABLESPACE or DB2HEALTH_OBJTYPE_TS_CONTAINER. Specify NULL if the object type is DB2HEALTH_OBJTYPE_DATABASE or DB2HEALTH_OBJTYPE_DATABASE_MANAGER. In the case of a table space container, the object name is specified as table_space_name.container_name.
dbpartitionnum
An input argument of type INTEGER that specifies the number of the database partition on which the health indicator entered an alert state. Valid values are 0 to 999, -1 (which specifies the currently connected database partition), and -2 (which specifies all active database partitions). An active database partition is a partition where the database is available for connection and use by applications.
client-locale
An input argument of type VARCHAR(33) that specifies a client language identifier. Use this parameter to specify the language in which recommendations are to be returned. If no value is specified, 'En_US' (English) will be used. Note that if the message files for the specified locale are not available on the server, 'En_US' will be used as the default.
recommendation-doc
An output argument of type BLOB(2M) that contains the recommendation document (XML), formatted according to the DB2 Health Recommendation schema definition (see the XML schema DB2RecommendationSchema.xsd, located in the misc subdirectory of the sqllib directory). The XML document is encoded in UTF-8, and text in the document is in the locale of the caller, or English, if messages are not available in the caller's locale at the target instance.

Authorization

One of the following authorities is required to execute the procedure:
  • EXECUTE privilege on the procedure
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority