Maintaining Data Integrity

To maintain data integrity, use a customized function string to remove undesired data out of the queues if you do not disable replication of off-row compressed LOB columns.

  1. Disable replication of compressed LOB columns:
    sp_setrepcol table_name, lob_column_name, ‘do_not_replicate’
  2. If the DSI thread shuts down, use a customized function string to remove undesired data from the queue.
    For example, using the table schema in the mytab5 table and a replication definition named reptab5, create a function string named reptab5.rs_insert based on the rs_insert function:
    • Table schema:
      create table mytab5
      (c1 int primary key, c2 text null compressed = 5) 
    • Replication definition:
      create replication definition reptab5 
      with primary at repl3_18540.pdb
      with all tables named mytab5
      (c1 int, c2 image null) 
      primary key (c1) 
    • Customized function string:
      alter function string reptab5.rs_insert
      for rs_sqlserver_function_class
      output language
      'insert mytab5(c1, c2) values(?c1!new? , '''')'