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 in Version
9.7.
For more information, see Health monitor has been deprecated.
Required Connection
Instance.
An explicit attachment is not required.
Command Syntax
>>-UPDATE ALERT--+-CONFIGURATION-+--FOR------------------------->
+-CONFIG--------+
'-CFG-----------'
>--+-+-+-DATABASE MANAGER-+-+----------------------------------------------+-->
| | +-DB MANAGER-------+ | |
| | '-DBM--------------' | |
| +-DATABASES------------+ |
| +-CONTAINERS-----------+ |
| '-TABLESPACES----------' |
'-+-DATABASE--------------------------------------+--ON--database-alias-'
+-TABLESPACE--tblspace-name---------------------+
'-CONTAINER--container-name--FOR--tblspace-name-'
>--USING--health-indicator-name--------------------------------->
.-,---------------------.
V |
>--+-SET----parameter-name--value-+--------------------------------------------------------------------+-><
| .-,------------------------------------------------------------------------------. |
| | .-,--------------------------. | |
| V V | | |
+-UPDATE ACTION----+-SCRIPT--pathname-+--ON--+-WARNING----------+----SET--parameter-name--value-+-+-+
| '-TASK--task-name--' +-ALARM------------+ |
| +-ALLALERT---------+ |
| '-ATTENTION--state-' |
| .-,----------------------------------------------. |
| V | |
+-DELETE ACTION----+-SCRIPT--pathname-+--ON--+-WARNING----------+-+---------------------------------+
| '-TASK--task-name--' +-ALARM------------+ |
| +-ALLALERT---------+ |
| '-ATTENTION--state-' |
| .-,----------------------------------------------------------------------------. |
| V | |
'-ADD ACTION----+-SCRIPT--pathname--| Add Script Details |-+--ON--| State and User Details |-+------'
'-TASK--task-name--------------------------'
Add Script Details
|--TYPE--------------------------------------------------------->
>--+-DB2--+------------------------------------------------+------+-->
| '-+-STATEMENT TERMINATION CHARACTER-+--character-' |
| +-STMT TERM CHAR------------------+ |
| '-TERM CHAR-----------------------' |
'-+-OPERATING SYSTEM-+--+------------------------------------+-'
'-OS---------------' '-+-COMMAND LINE PARAMETERS-+--parms-'
'-PARMS-------------------'
>--WORKING DIRECTORY--pathname----------------------------------|
State and User Details
|--+-WARNING----------+--+--------------+--USER--username------->
+-ALARM------------+ '-ON--hostname-'
+-ALLALERT---------+
'-ATTENTION--state-'
>--USING--password----------------------------------------------|
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:
- 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:
- 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:
- 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:
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 numerical values for some of the database health indicator
states are given below 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)
- query patroller
- explain tables
- db2pd output (package cache and lock timeout
mechanisms, among others)
- DB2 audit records