Chapter 11. Administering SQL Remote for AdaptiveSer ver
Anywhere
Error reporting and handling
Thissection describes how errors are reported and handled by the Message
Agent.

Default error handling

Thedefault action taken by the Message Agent when an error occurs is to
recordthe fact in its log output. TheMessage Agent sends log output to a
windowor a log file recording its operation. Bydefault, log output is sent to
thewindow only; the -o option sends output to a log file as well.
TheMessage Agent may print more information in the output log than in the
window.The Message Agent log includes the following:
Listingof messages applied.
Listingof failed SQL statements.
Listingof other errors.
UPDATEconflicts are not
errors UPDATEconflicts are not errors, and so are not reported in the Message
Agentoutput.
Formore information on the log file, see “The Message Agent” on
page292.

Ignoring errors

Theremay be exceptional cases where you wish to allow an error
encounteredby the Message Agent when applying SQL statements to go
unreported. This may arise when you know the conditions under which the
erroroccurs and are sure that it does not produce inconsistent data and that
itsconsequences can safely be ignored.
Toallow errors to go unreported, you can create a BEFORE trigger on the
actionthat causes the known error. The trigger should signal the
REMOTE_STATEMENT_FAILEDSQLSTATE (5RW09)or SQLCODE
(-288)value.
Forexample, if you wish to quietly fail INSERT statements on a table that
failbecause of a missing referenced column, you could create a BEFORE
INSERTtrigger that signals the REMOTE_STATEMENT_FAILED
SQLSTATEwhen the referenced column does not exist. The INSERT
statementfails, but the failure is not reported in the Message Agent log.
245