Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Remote » SQL Remote Replication Design » SQL Remote replication design and set up


Replication conflicts and errors

SQL Remote allows databases to be updated at multiple databases. Careful design is required to avoid replication errors, especially when the database has a complicated structure.

Replication conflicts

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

Conflicts occur in many systems. SQL Remote allows appropriate resolution of conflicts as part of the regular operation of a SQL Remote system, using triggers and procedures. See Default resolution for update conflicts.

Replication errors

Replication errors fall into the following categories:

  • Row not found errors   A user deletes a row (with a given primary key value.) A second user updates or deletes the same row at another site. In this case, the second statement fails, as the row is not found. See Row not found errors

  • Referential integrity errors   When a column containing a foreign key is included in a publication, but the associated primary key is not included, INSERT statements that reference the foreign key fail.

    Also, referential integrity errors can occur when a primary table has a SUBSCRIBE BY expression and the associated foreign table does not: rows from the foreign table may be replicated, but the rows from the primary table may be excluded from the publication.

    See Referential integrity errors.

  • Duplicate primary key errors   Two users insert a row using the same primary key values, or one user updates a primary key and a second user inserts a primary key of the new value. The second operation to reach a given database in the replication system fails because it would produce a duplicate primary key. See Duplicate primary key errors.

Delivery errors

For information about delivery errors and how they are handled, see Understanding the Guaranteed Message Delivery System.

See also