Collection Contents Index Running the Message Agent Adaptive Server Enterprise transaction log and backup management pdf/chap12.pdf

Data Replication with SQL Remote
   PART 3. SQL Remote Administration
     CHAPTER 12. Administering SQL Remote for Adaptive Server Enterprise       

Error reporting and handling


This section describes how errors are reported and handled by the Message Agent.

Top of page  Default error handling

The default action taken by the Message Agent when an error occurs is to record the fact in its log output. The Message Agent sends log output to a window or a log file recording its operation. By default, log output is sent to the window only; the -o command-line option sends output to a log file as well.

The Message Agent log includes the following:

UPDATE conflicts are not errors 

UPDATE conflicts are not errors, and so are not reported in the Message Agent output.

Top of page  Implementing error handling procedures

SQL Remote allows you to carry out some other process in addition to logging a message if an error occurs. The Replication_error database option allows you to specify a stored procedure to be executed by the Message Agent when an error occurs. By default no procedure is executed .

The procedure must have a single argument of type CHAR, VARCHAR, or LONG VARCHAR. The procedure is called twice: once with the error message and once with the SQL statement that causes the error.

While the option allows you to track and monitor errors in replication, you must still design them out of your setup: this option is not intended to resolve such errors.

For example, the procedure could insert the errors into a table with the current time and remote user ID, and this information can then replicate back to the consolidated database. An application at the consolidated database can create a report or send e-mail to an administrator when errors show up.

For Info     For information on setting the REPLICATION_ERROR option, see SQL Remote options.

Top of page  

Collection Contents Index Running the Message Agent Adaptive Server Enterprise transaction log and backup management pdf/chap12.pdf