Subscription Materialization of LOB Compressed Data

Adaptive Server 15.7 and later supports LOB compression.

Support for subscription materialization of LOB compressed data depends on:
  • How you specify the column datatype in the replication definition
  • Whether there is at least one version 15.7.1 SP100 or later Replication Server, and the position of this Replication Server relative to the other Replication Server in a replication system with multilple Replication Servers
If the Replication Server version is earlier than 15.7.1 SP100, Replication Server supports materialization of LOB compressed and uncompressed data if the datatypes of the LOB columns you define in the replication definition are the same as the datatypes of the corresponding LOB columns in the primary table schema.
Replication Server Versions Earlier Than 15.7.1 SP100
Column Datatype in Primary Table Schema Column Datatype in Replication Definition Materialization Supported
image image Yes
text text Yes
unitext unitext Yes
image text or unitext No
text image or unitext No
unitext text or image No
If the Replication Server version is 15.7.1 SP100 and later, Replication Server supports materialization of LOB:
  • Compressed data – if you define the datatypes of the LOB columns in the replication definition as image
    Column Datatype in Primary Table Schema Column Datatype in Replication Definition Materialization Supported
    image image Yes
    text image Yes
    unitext image Yes
  • Uncompressed data – if the datatypes of the LOB columns you define in the replication definition are the same as the datatypes of the corresponding LOB columns in the primary table schema.
    Column Datatype in Primary Table Schema Column Datatype in Replication Definition Materialization Supported
    image image Yes
    text text Yes
    unitext unitext Yes
    text image Yes
    Warning!  Although materialization completes, do not define the column datatype as image in the replication definition as this results in data corruption during replication. See Replication Server Troubleshooting Guide > RepAgent Problems > Errors from the Replication Server > Error 32044 > Solution to fix data corruption if you have incorrectly defined the datatypes in the replication definition.
    unitext image Yes
    Warning!  Although materialization completes, do not define the column datatype as image in the replication definition as this results in data corruption during replication. See Replication Server Troubleshooting Guide > RepAgent Problems > Errors from the Replication Server > Error 32044 > Solution to fix data corruption if you have incorrectly defined the datatypes in the replication definition.
Example of a replication definition specifying the au_photo LOB column as image datatype:
create replication definition pubs_copy_rep1
with primary at TOKYO_DS.pubs2
with primary table named 'publishers'
with replicate table named joe.'pubs_copy' 
(pub_id, pub_name as pub_name_set, au_photo image)
primary key (pub_id)
Example of a replication definition specifying the c_image, c_text, and c_unitext columns as image, text, and unitext datatypes respectively, to match the original datatyes in the pubs2 primary database:
create replication definition pubs_copy_rep2
with primary at TOKYO_DS.pubs2
with all tables named lob (c_key integer, c_image image null, c_text text null, c_unitext unitext null )
primary key (c_key)

If you incorrectly define the column datatypes for the LOB columns in the replication definition, subscription materialization does not proceed and RepAgent shuts down. See Replication Server Troubleshooting Guide > RepAgent Problems > Errors from the Replication Server > Error 32044 to purge the corrupted data that was replicated and to resume replication.