UPDATE ALERT CONFIGURATION command
The UPDATE ALERT CONFIGURATION command updates the alert configuration settings for health indicators.
Important: This command or API has been deprecated and might be removed in a future release because the
health monitor has been deprecated. It is not supported in Db2®
pureScale® environments. For more
information, see Health monitor has been deprecated.
Authorization
One of the following authorities:
- SYSADM
- SYSMAINT
- SYSCTRL
Required Connection
Instance. An explicit attachment is not required.
Command Syntax
Command Parameters
- DATABASE MANAGER
- Updates alert settings for the database manager.
- DATABASES
- Updates alert settings for all databases managed by the database manager. These are the settings that apply to all databases that do not have custom settings. Custom settings are defined using the DATABASE ON database-alias clause.
- CONTAINERS
- Updates alert settings for all table space containers managed by the database manager. These are the settings that apply to all table space containers that do not have custom settings. Custom settings are defined using the CONTAINER container-name ON database-alias clause.
- TABLESPACES
- Updates alert settings for all table spaces managed by the database manager. These are the settings that apply to all table spaces that do not have custom settings. Custom settings are defined using the TABLESPACE tblspace-name ON database-alias clause.
- DATABASE ON database-alias
- Updates the alert settings for the database specified using the ON database-alias clause. If this database has custom settings, then they override the settings for all databases for the instance, which is specified using the DATABASES parameter.
- CONTAINER container-name FOR tblspace-name ON database-alias
- Updates the alert settings for the table space container called container-name, for the table space specified using the FOR tblspace-name clause, on the database specified using the ON database-alias clause. If this table space container has custom settings, then they override the settings for all table space containers for the database, which is specified using the CONTAINERS parameter.
- TABLESPACE tblspace-name ON database-alias
- Updates the alert settings for the table space called name, on the database specified using the ON database-alias clause. If this table space has custom settings, then they override the settings for all table spaces for the database, which is specified using the TABLESPACES parameter.
- USING health-indicator-name
- Specifies the set of health indicators for which alert configuration will be updated. Health
indicator names consist of a two-letter object identifier followed by a name which describes what
the indicator measures. For example:
db.sort_privmem_util
- SET parameter-name value
- Updates the alert configuration element, parameter-name, of the health
indicator to the specified value. parameter-name must be one of the following
values:
- ALARM: the value is a health indicator unit.
- WARNING: the value is a health indicator unit.
- SENSITIVITY: the value is in seconds.
- ACTIONSENABLED: the value can be either YES or NO.
- THRESHOLDSCHECKED: the value can be either YES or NO.
- UPDATE ACTION SCRIPT pathname ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Specifies that the script attributes of the predefined script with absolute path name
pathname will be updated according to the following clause:
- SET parameter-name value
- Updates the script attribute, parameter-name, to the specified value.
parameter-name must be one of the following values:
- SCRIPTTYPE
OS or DB2 are the valid types.
- WORKINGDIR
- TERMCHAR
-
CMDLINEPARMSThe command line parameters that you specify for the operating system script will precede the default supplied parameters. The parameters that are sent to the operating system script are:
- List of user supplied parameters
- Health indicator short name
- Fully qualified object name
- Health indicator value
- Alert state
- USERID
- PASSWORD
- SYSTEM
- SCRIPTTYPE
- UPDATE ACTION TASK task-name ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Specifies that the task attributes of the task with name name will be updated
according to the following clause:
- SET parameter-name value
- Updates the task attribute, parameter-name, to the specified value.
parameter-name must be one of the following values:
- USERID
- PASSWORD
- SYSTEM
- DELETE ACTION SCRIPT pathname ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Removes the action script with absolute path name pathname from the list of alert action scripts.
- DELETE ACTION TASK task-name ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Removes the action task called name from the list of alert action tasks.
- ADD ACTION SCRIPT pathname ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Specifies that a new action script with absolute path name pathname is to be
added, the attributes of which are given by the following:
- TYPE
- An action script must be either a Db2 Command
script or an operating system script:
- DB2
- OPERATING SYSTEM
If it is a Db2 Command script, then the following clause allows one to optionally specify the character, character, that is used in the script to terminate statements:STATEMENT TERMINATION CHARACTER ;
If it is an operating system script, then the following clause allows one to optionally specify the command-line parameters, parms, that would be passed to the script upon invocation: COMMAND LINE PARAMETERS parms
- WORKING DIRECTORY pathname
- Specifies the absolute path name, pathname, of the directory in which the script will be executed.
- USER username USING password
- Specifies the user account, username, and associated password, password, under which the script will be executed.
- ADD ACTION TASK name ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Specifies that a new task, called name, is to be added to be run ON the specified condition.
- ON [WARNING | ALARM | ALLALERT | ATTENTION state]
- Specifies the condition on which the action or task will run. For threshold-based health
indicators (HIs), this is WARNING or ALARM. For state-based HIs, this will be a numeric state as documented for each
state-based HI (for example, for the ts.ts_op_status health indicator, refer to the
tablespace_state monitor element for table space states).
ALLALERTS handles any changes in the state for threshold-based HIs and
state-based HIs (for example, the state changes from warning to normal).
- ATTENTION state
- Valid numeric values for some of the database health indicator states are given in the following
section, as an example for the ADD ACTION SCRIPT CLP command option:
- 0 - Active; Normal (ACTIVE)
- 1 - Quiesce pending (QUIESCE_PEND)
- 2 - Quiesced (QUIESCED)
- 3 - Rollforward (ROLLFWD)
Additional state-based health indicators are defined in the header files sqlmon.h and sqlutil.h.
Usage notes
For the ADD ACTION option, the supplied username and
password may be exposed in various places where SQL statement text is captured:
- the network (username/password are passed over the wire unencrypted)
- db2diag log file
- trace files
- dump file
- snapshot monitor (dynamic SQL snapshot)
- system monitor snapshots
- a number of event monitors (statement, deadlock)
- explain tables
- db2pd output (package cache and lock timeout mechanisms, among others)
- Db2 audit records