You add a new entry to an event dispatcher configuration file.
An entry in a configuration file assigns conditions (event categories and other event properties) to a command of the Database Manager CLI or another program.
If the event dispatcher using the configuration file has already been started, then it immediately considers the new entry.
The event for which the handling is to be defined in the configuration file, is active.
You can find an overview of the events that are always active and those that you can activate and deactivate, in Concepts of the Database System, Overview of Database Event Categories.
The special events of the event dispatcher are always active.
dbmevtdisp add <configuration_file> <condition> <command>
<condition> :: = Name == <event_category> [Priority == HIGH|MEDIUM|LOW] [Value1 ==|>=|<=|>|< <NumVal>] [Value2 ==|>=|<=|>|< <NumVal>]
<command> :: = Command == <program> [<parameter_list>]
<parameter_list> :: = <parameter> | <parameter> <parameter> …
Option |
Description |
<configuration_file> |
Configuration file with complete path If this file does not yet exist, the event dispatcher then creates this in the current folder when the add command is executed. |
<condition> |
Condition that must be fulfilled in order for the event dispatcher to execute the <command>. Syntax: |
<command> |
Command executed when <condition> is fulfilled |
<event_category> |
Event Category You can use the * character as a placeholder. |
<NumVal> |
Values that the event dispatcher compares with the values VALUE1 and VALUE2 that the database system returns whenever an event occurs (additional information on the database status according to event category). |
<program> |
Program (and command of this program if required) called whenever the event occurs |
<parameter> |
Parameters that the event dispatcher transfers to the <program> whenever the event occurs You can specify any parameters you like. The following table provides a list of special predefined placeholders that you can use instead of the parameters. |
The following table contains defined placeholders that you can use in the configuration file of an event dispatcher.
Placeholder |
Description |
$DBNAME$ |
Name of the database instance monitored |
$DBMUSERPW$ |
Name and password of DBM operator by means of which the event dispatcher logs on to the database instance. |
$EVTNAME$ |
Event category |
$EVTVAL1$ |
Initial value VALUE1 returned by the database system whenever the event occurs (additional information on database status, depending on the event category) |
$EVTVAL2$ |
Second value VALUE2 returned by the database system whenever the event occurs (additional information on database status, depending on the event category) |
$EVTDATE$ |
Date on which event was triggered |
$EVTTIME$ |
Time at which event was triggered |
$EVTTEXT$ |
Description of event |
$EVTCOUNT$ |
Number of times event has already been triggered |
$EVTPRIO$ |
Event priority |
$SERVERNAME$ |
Database computer |
OK
<entry_ID>
You receive a numerical ID that identifies the newly-created entry in the configuration file. You use this ID to delete the entry again from the configuration file.
You create a new entry in the configuration file C:\test\testconfig.cfg. If an event dispatcher is started with this configuration file, this entry has the effect that, if the event dispatcher receives a LOGFULL event, it calls the alarmapp program and transfers the name of the database instance that has triggered the event to this program.
dbmevtdisp add C:\test\testconfig.cfg Name == LOGFULL Command == "alarmapp $DBNAME$"
OK
2
The event dispatcher has allocated the ID 2 to the newly-created entry in the configuration file.
See also:
Configuration for the Event Dispatcher
Database Administration Tutorial, Saving the Log Area Automatically After the Event LOGABOVELIMIT