Collection Contents Index Who gets what? CHAPTER 7.  SQL Remote Design for Adaptive Server Anywhere pdf/chap6.pdf

Data Replication with SQL Remote
   PART 2. Replication Design for SQL Remote
     CHAPTER 6. Principles of SQL Remote Design       

Replication errors and conflicts


SQL Remote is designed to allow databases to be updated at many different sites. Careful design is required to avoid replication errors, especially if the database has a complicated structure. This section describes the kinds of errors and conflict that can occur in a replication setup; subsequent sections describe how you can design your publications to avoid errors and manage conflicts.

Delivery errors not discussed here    
This section does not discuss issues related to message delivery failures. For information on delivery errors and how they are handled, see The message tracking system

Top of page  Replication errors

Replication errors fall into the following categories:

Top of page  Replication conflicts

Replication conflicts are different from errors. Properly handled, conflicts are not a problem in SQL Remote.

Top of page  Tracking SQL errors

SQL errors in replication must be designed out of your setup. SQL Remote includes an option to help you track errors in SQL statements, but this option is not intended to resolve such errors.

By setting the Replication_error option, you can specify a stored procedure to be called by the Message Agent when a SQL error occurs. By default no procedure is called.

  To set the Replication_error option in Adaptive Server Anywhere:
  1. Issue the following statement:

    SET OPTION 
    remote-user.Replication_error 
    = 'procedure-name'

    where remote-user is the user ID on the Message Agent command line, and procedure-name is the procedure called when a SQL error is detected.

  To set the Replication_error option in Adaptive Server Enterprise:
  1. Issue the following statement:

    exec sp_remote_option Replication_error, procedure-name
    go

    where procedure-name is the procedure called when a SQL error is detected.

Replication error procedure requirements 

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

Top of page  

Collection Contents Index Who gets what? CHAPTER 7.  SQL Remote Design for Adaptive Server Anywhere pdf/chap6.pdf