The ph_alert Table

The ph_alert table contains information about event alarms generated by the database server or alerts generated by the Scheduler. Alerts that are associated with built-in tasks and sensors are automatically added to the ph_alert table.

Table 1. The ph_alert table
Column Type Description
id serial The alert ID.

System generated; do not modify.

alert_task_id serial The task or sensor ID.

Must be the same as a value in the tk_id column in the ph_task table.

The task ID for event alarms is 15.

alert_task_seq integer Identifies which invocation of a task created the alert.

System generated; do not modify.

Referenced from the tk_sequence column in the ph_task table.

alert_type char(8) The type of alert:
  • INFO (Default)
  • WARNING
  • ERROR

The severity of an alert or event alarm is indicated by the combination of the alert type and the alert color. See Table 2.

alert_color char(15) The color of the alert:
  • GREEN (Default)
  • YELLOW
  • RED

The severity of an alert or event alarm is indicated by the combination of the alert type and the alert color. See Table 2.

alert_time datetime year to second The time when the alert was generated.

System updated; do not modify.

alert_state char(15) Indicates which state the object is in:
NEW
(Default) The alert was added and no other action has occurred on this alert.
IGNORED
The alert was acknowledged by the DBA and no action was taken.
ACKNOWLEDGED
The alert was acknowledged by the DBA.
ADDRESSED
The alert was addressed by the DBA.
alert_state_changed datetime year to second The last time that the state was changed.

System updated; do not modify.

alert_object_type char(15) The type of object that the alert is for:
  • ALARM
  • CHUNK
  • DATABASE
  • DBSPACE
  • INDEX
  • MISC (Default)
  • SERVER
  • SQL_STATEMENT
  • TABLE
  • USER
alert_object_name varchar(255) The name of the object that the alert is for or the event alarm class ID.
alert_message lvarchar The detailed message describing the alert or event alarm.
alert_action_dbs lvarchar(256) The name of the database to use for the corrective action.

Default is sysadmin.

alert_action lvarchar The corrective action.

An SQL script to invoke to correct the problem. This script must comply with all multi-statement prepare rules.

Can be NULL if no action is available.

alert_object_info bigint For alerts of type ALARM, the event ID of the event alarm.
The following table defines the alert colors for the three types of messages and event alarms.
Table 2. Alert types and colors
Message Type Green Yellow Red
Informative A status message indicating a component's operation status.

An event alarm of severity 1 (not noteworthy).

An important status message.

An event alarm of severity 2 (information).

A status message that requires action.
Warning A warning from the database that was automatically addressed. A future event that needs to be addressed.

An event alarm of severity 3 (attention).

A predicted failure is imminent. Immediate action is required.
Error A failure in a component corrected itself. A failure in a component corrected itself but might need DBA action. A failure in a component requires DBA action.

An event alarm of severity 4 (emergency) or 5 (fatal).

The ph_alerts view shows alert information and associated task or sensor information.


Copyright© 2019 HCL Technologies Limited