Error 32046

Inconsistencies in the replication status of text, unitext, or image columns between the Adaptive Server database and the replication definition.

Symptom

Replication Server error 32046 is reported 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.’

Explanation

The replication status for text, unitext, and image columns in the Adaptive Server database is carried in the modification Log Transfer Language (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 both the Adaptive Server database and the replication definition, 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).

Solution 1

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.

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 sp_setrepcol 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.

Solution 2

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:
  • Replicate text, unitext, or image columns, or

  • Not replicate text, unitext, or image columns.

To replicate text, unitext, or image columns:
  1. Execute sp_setrepcol 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.

To not 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.