existat other databases in the setup. Whenan action that fires a trigger at the
consolidateddatabase is replicated at the replicate site, the trigger is
automaticallyfired. By default, the database extractionutility extracts the
triggerdefinitions, so that they are in place at the remote database also.
Ifa publication includes only a subset of a database, a trigger at the
consolidateddatabase may refer to tables or rows that are present at the
consolidateddatabase, but not at the remote databases. Youcan design your
triggersto avoid such errors by making actions of the trigger conditional
usingan IF statement. The followinglist suggests some ways in which
triggerscan be designed to work on consolidated and remote databases.
Haveactions of the trigger be conditional on the value of CURRENT
PUBLISHER.In this case, the trigger would not execute certain actions
atthe remote database.
Haveactions of the trigger be conditional on the object_id function not
returningNULL. The object_idfunction takes a table or other object as
argument,and returns the ID number of that object or NULL if the object
doesnot exist.
Haveactions of the trigger be conditional on a SELECT statement which
determinesif rows exist.
TheRESOLVE UPDATEtrigger is a special trigger type for the resolution
ofUPDATE conflicts, and is discussed in the section “Conflict resolution
examples”on page 124. Theactions of RESOLVE UPDATEtriggers are
replicatedto remote databases, including the database that caused the
conflict.
128