Enabling and disabling replication for LOB columns

In this document, all columns that contain large-object (LOB) datatypes are referred to as LOB columns, regardless of the actual datatype name used by the primary database vendor. To replicate transactions that affect a LOB column, replication must be enabled for that column.

You must enable replication for each LOB column you want to replicate, in addition to marking and enabling replication for the table that contains the LOB column.

See “Marking and unmarking tables”.

When a table is marked for replication and replication is enabled for that table but not for a LOB column in that table, any part of a transaction that affects the LOB column is not replicated. The portion of a transaction that affects all other nonLOB columns is replicated if the table is marked for replication and replication is enabled for the table.

StepsEnabling replication for a LOB column in a marked table

  1. Log in to the Replication Agent instance with the administrator login.

  2. Use the pdb_setrepcol command to verify that replication is disabled for the LOB column:

    pdb_setrepcol pdb_table, pdb_col
    

    where:

    • pdb_table is the name of the marked table that contains the LOB column.

    • pdb_col is the name of the LOB column.

    If the pdb_setrepcol command returns information that the LOB column has replication disabled, continue this procedure to enable replication for the column.

    NoteThe table that contains the LOB column must be marked for replication before replication can be enabled or disabled for a LOB column.

  3. Use the pdb_setrepcol command to enable replication for the LOB column:

    pdb_setrepcol pdb_table, pdb_col, enable
    

    where:

    • pdb_table is the name of the marked table that contains the LOB column.

    • pdb_col is the name of the LOB column for which you want to enable replication.

    After replication is enabled for the LOB column (and if replication is enabled for the table that contains the column), any transaction that affects the data in that column is replicated.

  4. You can use the pdb_setrepcol command again to verify that replication is now enabled for the LOB column:

    pdb_setrepcol pdb_table, pdb_col
    

    where:

    • pdb_table is the name of the marked table that contains the LOB column.

    • pdb_col is the name of the LOB column for which you want to verify that replication is enabled.

StepsDisabling replication for a LOB column in a marked table

  1. Log in to the Replication Agent instance with the administrator login.

  2. Use the pdb_setrepcol command to verify that replication is enabled for the LOB column:

    pdb_setrepcol pdb_table, pdb_col
    

    where:

    • pdb_table is the name of the marked table that contains the LOB column.

    • pdb_col is the name of the LOB column you want to disable replication for.

    If the pdb_setrepcol command returns information that the LOB column has replication enabled, continue this procedure to disable replication for the column.

    NoteThe table that contains the LOB column must be marked for replication before replication can be enabled or disabled for a LOB column.

  3. Use the pdb_setrepcol command to disable replication for the LOB column:

    pdb_setrepcol pdb_table, pdb_col, disable
    

    where:

    • pdb_table is the name of the marked table that contains the LOB column.

    • pdb_col is the name of the LOB column for which you want to disable replication.

    After replication is disabled for the LOB column, transactions that affect the data in that column are not replicated unless replication is enabled for that column again.

  4. You can use the pdb_setrepcol command again to verify that replication is now disabled for the LOB column:

    pdb_setrepcol pdb_table, pdb_col
    

    where:

    • pdb_table is the name of the marked table that contains the LOB column.

    • pdb_col is the name of the LOB column for which you want to verify that replication is disabled.