Was this helpful?
Using SQL Statements on Replicated Tables
Certain SQL statements can have unexpected effects on replicated tables. Be aware of the following statements when maintaining the replication system:
Modify to Truncated Statement
The SQL statement MODIFY TO TRUNCATED bypasses change recording and, therefore, must not be used with replicated tables. If you are deleting in bulk from a replicated table and the deletion of records is expected to be replicated throughout the replication system, use the DELETE statement instead of the MODIFY TO TRUNCATED statement.
Use a MODIFY TO TRUNCATED statement if you are completely cleaning out a table. In this case, issue MODIFY TO TRUNCATED on the table to be cleared in every database in the replicated system. It is also recommended that you run the Arcclean utility at this time.
Integrity Constraints
Ingres constraints, which are defined using the CREATE TABLE and ALTER TABLE statements, must be identical among replicated databases. If the statements are not identical, a Replicator Server transmission error can result. The error occurs when a server is attempting to replicate data into a target database and finds that this violates the constraints of the target database.
In addition, keep in mind that referential integrity constraints cause irresolvable situations if rows related by the constraint are updated on different databases. For example, if a user deletes a customer information row in one database, while another user adds a purchase order for that customer in a second database, and there is a constraint on the purchase order table to the customer table primary key, the purchase order cannot be propagated to the first database. Because this is not a conflict between the same row in the two databases, automatic collision resolution cannot correct this.
The CREATE INTEGRITY statement, which is used to define integrity constraints, must also be identical among replicated databases.
Last modified date: 06/08/2023