The enhanced add event trigger command supports the four new triggers. For more information on add event trigger, see Chapter 9, “Replication Monitoring Services API,” in the Replication Server Reference Manual.
The modified add event trigger syntax is:
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
The new parameters are:
component_name – in RMS 15.0, the component name is required if a component type is provided. In this EBF, you can create a size trigger for the sum of all partitions. add event trigger includes a type partition, but not the partition’s name.
with primary primary_connection – identifies the primary connection for a connection latency trigger. The trigger executes the script if the latency threshold between the primary connection and the replicate connection is not satisfied.
size exceeds, falls below size_threshold – indicates whether the trigger should execute when the size exceeds the threshold or when it falls below the threshold.
latency exceeds, falls below latency_threshold – indicates whether the trigger should execute when the latency exceeds the threshold or when it falls below the threshold.
Here are examples using the new triggers in RMS:
Adds a trigger to the Replication Server INVENTORY_RS partition “p1” that executes the script email.sh when the partition usage exceeds 80 percent:
add size trigger partition p1 for INVENTORY_RS size exceeds 80 continuous true execute /sybase/RMS/scripts/email.sh
Adds a trigger to the Replication Server INVENTORY_RS that executes the script email.sh when the sum of all partition usage exceeds 75 percent:
add size trigger partition for INVENTORY_RS size exceeds 75 execute /sybase/RMS/scripts/email.sh
Adds a trigger to the queue “inventory_pds.vendor(Inbound)” of Replication Server INVENTORY_RS that executes the script email.sh when the queue size falls below 100 megabytes:
add size trigger queue inventory_pds.vendor(Inbound) for INVENTORY_RS size falls below 100 continuous true execute /sybase/RMS/scripts/email.sh
Adds a trigger to the replicate connection “inventory_rds.vendor” of replicate Replication Server INVENTORY_RS that will execute the script email.sh when the latency from the primary connection “inventory_pds.vendor” exceeds 5 minutes (300 seconds):
add latency trigger connection inventory_rds.vendor with primary inventory_pds.vendor for INVENTORY_RS latency exceeds 300 execute /sybase/RMS/scripts/email.sh
You must set for server_name to the name of the replicate Replication Server when adding a latency connection trigger. In the following 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