Procedure documentationUsing Database Events Locate this document in the navigation structure

 

An event is a notification from the database system that a certain defined situation has occurred.

Every event is defined by properties such as name and priority, and belongs to an event category. The values that determine when an event of a certain category is triggered are stored in the system. When this value is reached, the system triggers an event. For some categories, there are multiple different property definitions (default values) that trigger an event of that category.

Using database events, you can automate administration tasks or configure notification options for monitoring your database.

Example Example

You define that the system is to send a warning mail to your address when the database fill level exceeds 90%.

End of the example.

You can use Database Studio to specify values for the properties and determine which actions are triggered.

Prerequisites

  • You have the server authorization SystemCmd.

    For more information, see Glossary, Server Permission.

  • The installation-specific X server is running on the database computer.

    Note Note

    On startup of Database Studio, an X server is started automatically. If it has been stopped for some reason, you can start it again manually, see X Server, Starting the Global Listener and/or Installation-Specific X Servers.

    End of the note.
  • A member of the operating system's administrators group has created the file dbm_whitelist.cfg. This file contains absolute paths to the programs that may be linked to events. You enter one program per line. For security reasons, you can only create a link between an event and a program if the program is listed in this file. Exception: Program SDBMAIL, which can be used to send e-mails when events occur and which is called via a function on the DBM server directly. Note that the file must exist even if it is empty.

    Caution Caution

    If powerful programs such as cmd.exe are entered in the dbm_whitelist.cfg file, this enables extensive manipulations of the entire system.

    End of the caution.
  • The current operating system user can access and execute the program that is to be linked to an event.

Procedure

Starting the Event Dispatcher

Links between events and programs only result in actions if the event dispatcher is started. If you define a new link while the event dispatcher is already runnig, the link takes effect immediately.

  1. Select the database in the explorer tree.

  2. In the context menu of the database, choose   Administration Tasks   Database Event Dispatcher...  .

  3. Select Activate database event dispatcher.

  4. Choose Activate.

Defining Events and Linking Programs to Events
  1. Select the database in the explorer tree.

  2. In the context menu of the database, choose   Administration Tasks   Database Event Dispatcher...  .

  3. Choose New...

    Note that it is possible to define events of the same category for different threshold values and then link them to different programs.

  4. Configure the event options:

    Options

    Option

    Description

    <event_category>

    Event category; possible values are:

    ThrowDBFillingAboveLimitEvent | ThrowDBFillingBelowLimitEvent | ThrowLogAboveLimitEvent

    ThrowDBFillingAboveLimitEvent:

    The system triggers events of this category when the fill level of the data area exceeds the predefined value.

    Default system values are events with the fill levels of 90%, 95%, 96%, 97%, 98% and 99% (HIGH priority), with the fill levels of 80%, 85% (MEDIUM priority) and with the fill level of 70% (LOW priority)

    ThrowDBFillingBelowLimitEvent:

    The system triggers events of this category when the fill level of the data area falls below the predefined value.

    Default system values are events with the fill levels of 70%, 80%, 85%, 90% and 95% (LOW priority).

    ThrowDBFillingAboveLimitEvent:

    The system triggers events of this category when the fill level of the data area exceeds the predefined values.

    Default system values are events with the fill levels of 96%, 97%, 99% and 99% (HIGH priority), with the fill levels of 90% and 95% (MEDIUM priority) and with the fill levels of 50% and 75% (LOW priority)

    <priority>

    Priority of an event

    Possible values are: LOW | MEDIUM | HIGH

    For events that belong to a category that is changeable, you can override the default values in the database system.

    <value>

    Numerical value whose meaning depends on the event

    DBFILLINGABOVELIMIT:

    For any fill level between 0% and 99% exceeding the defined value, you can define an event (value range 0 ≤ n ≤ 99) as well as a priority for that event.

    DBFILLINGBELOWLIMIT:

    For any fill level between 0% and 100% falling short behind the defined value, you can define an event (value range 1 ≤ n ≤ 100) as well as a priority for that event.

    LOGABOVELIMIT

    For any fill level between 0% and 100% exceeding the defined value, you can define an event (value range 0 ≤ n ≤ 100) as well as a priority for that event.

  5. Enter the command that is to be executed when the event occurs. Either choose a template or enter the command manually.

  6. Choose Finish.

Configuring Mail Notification

SDB Mail (sdbmail) can be used to send e-mails to one or more recipients. SDB Mail uses the Simple Mail Transfer Protocol (SMTP) according to the standard RFC 822. SDB Mail only evaluates one parameter. This parameter describes the contents and the recipient(s) of the e-mail in XML format.

  1. Select the database in the explorer tree.

  2. In the context menu of the database, choose   Administration Tasks   Database Event Dispatcher...  .

  3. Choose SDB Mail Configuration.

  4. Enter the following data:

    Mail Configuration: Options

    Property

    Description

    SMTP Sender Address

    Sender address of the generated mail

    SMTP Server[:<port>]

    SMTP server name and port number

    If you do not enter a port number, the system uses port 25.

    To specify more than one mail server, separate them by commas (no spaces).

  5. Choose Finish.

More Information

Database Administration, Automating Administration Tasks