add event trigger

Adds a trigger that is executed by the RMS when a specific event occurs in the replication domain. A trigger identifies a process or script that is executed by the RMS.

Syntax

add {status | latency | size} trigger 
       [{connection | logical connection | route | queue | rep agent |
         partition} [component_name]]
       [with primary primary_connection]
       for server_name
       {status changes to state |
         size {exceeds | falls below} size_threshold |
         latency {exceeds | falls below} latency_threshold}
       [wait wait_interval]
       [continuous continuous_flag]
       execute command

Parameters

Examples

Usage

  • You can add one status trigger for each server or component status. For example, you can add a trigger for a Replication Server when the status changes to “DOWN” or “SUSPECT”, but you cannot add two triggers to the “DOWN” status.

  • You must set server_name to the name of the replicate Replication Server when adding a latency connection trigger. In this example, INVENTORY_RS is the replicate Replication Server:
    add latency trigger connection inventory_rds.vendor
        with primary invetory_pds.vendor
        for INVENTORY_RS
        latency exceeds 300
         execute /sybase/RMS/scripts/email.sh
  • You must set the configuration parameter ltl_origin_time_require to “true” when setting up a latency connection trigger where the primary connection is from a Replication Agent or MRA. To set the parameter, connect to the Replication Agent or MRA and execute:
    ra_config ltl_origin_time_required, true
  • add event trigger returns the following result set:

    Column Descriptions for add event trigger

    Column

    Description

    Action

    The name of the action

    Result

    The result of the execution

Related reference
drop event trigger
get triggers