Replication status inconsistency of text, unitext, or image columns

Another normalization error occurs when there are inconsistencies in the replication status of text, unitext, or image columns between the Adaptive Server database and the replication definition. Replication Server error 32046 is displayed in the Adaptive Server error log (for RepAgent):

Message: 32046 -- ’The status of column ’%s’ in repdef
is inconsistent with that of the LTL command.’

The replication status for text, unitext, and image columns in the Adaptive Server database is carried in the modification LTL commands that the RepAgent sends to the Replication Server. If the status of a text, unitext, or image column is not the same in the Adaptive Server database and in the replication definition, then Replication Server detects the inconsistency when the modification is being replicated, and the RepAgent shuts down.

If a text, unitext, or image column has a status of do_not_replicate at the Adaptive Server database and the replication definition includes that column for replication, processing continues and the Replication Server sends the modifications to the replicate database without the text, unitext, or image data. The Replication Server records a warning message in the Adaptive Server error log (for the RepAgent).

Use the following procedures to resolve replication status inconsistencies for text, unitext, or image column status and to resume operations after the RepAgent has shut down.


When replicate_if_changed conflicts with always_replicate

When the RepAgent shuts down because a text or image column has a status of replicate_if_changed at the Adaptive Server database and always_replicate in the replication definition, you must change the replication status so that they match, for example, either:

To replicate text, unitext, or image columns only when their values change:

  1. Execute the alter replication definition command at the primary Replication Server and change the status of the text, unitext, or image columns to replicate_if_changed. Wait for the modified replication definition to arrive at the replicate sites.

  2. Restart the RepAgent.

To always replicate text, unitext, or image columns:

  1. Stop updates at the primary table.

  2. Execute the alter replication definition command at the primary Replication Server, and change the status of the text, unitext, or image columns to replicate_if_changed. Wait for the modified replication definition to arrive at the replicate sites.

  3. Restart the RepAgent to let transactions with a replicate_if_changed status finish processing.

  4. Execute the sp_setrepcol system procedure at the Adaptive Server and change the status to always_replicate.

  5. Execute alter replication definition at the primary Replication Server and change the status of the text, unitext, or image columns to always_replicate. Wait for the modified replication definition to be replicated to the replicate sites.

  6. Resume updates to the primary table.


When do_not_replicate columns are included in the replication definition

When the Replication Server reports that the status of a text or image column is do_not_replicate at the Adaptive Server database and the replication definition includes that column for replication, you must change the replication status to either:

If you want to replicate text, unitext, or image columns:

  1. Execute the sp_setrepcol system procedure at the Adaptive Server database and change the status of the text, unitext, or image column to always_replicate or replicate_if_changed. It should match the status in the replication definition.

  2. Wait for subsequent transactions that modify the text, unitext, or image column to be processed by the Replication Server.

  3. Consider correcting any inconsistencies with the rs_subcmp program.

If you do not want to replicate text, unitext, or image columns:

  1. Stop updates to the primary table.

  2. Drop subscriptions to the replication definition.

  3. Drop the replication definition.

  4. Re-create the replication definition without the text, unitext, or image columns, and re-create subscriptions.

  5. Resume updates to the primary table.