Synchronizing Significantly Inconsistent Tables
If your target tables are significantly inconsistent, you can speed the synchronization process by truncating the target tables before you perform direct synchronization.
About this task
When you truncate a table by using the TRUNCATE statement, you remove all rows from the table while replication is active. After the tables on the target servers are empty, direct synchronization efficiently applies data from the source server to the target servers.
If you use the TRUNCATE statement on the supertable in a hierarchy, by default, rows in all the subtables are deleted as well. You can use the ONLY keyword to limit the truncate operation to the supertable. For more information on the TRUNCATE statement, see the HCL OneDB™ Guide to SQL: Syntax.
To synchronize tables in conjunction with truncation:
Procedure
- Run the TRUNCATE statement on the tables to be synchronized on the target servers.
- Run the cdr sync replicate or cdr sync replicateset command.
Results
For the syntax of these commands, see cdr sync replicate and cdr sync replicateset.