Replicating computed columns

Computed columns allow you to create an expression and place the result of the expression in a table column. A computed column is:

A computed column expression is:

Replication Server replicates materialized computed columns in DML statements in the same way it replicates other columns; it does not replicate virtual computed columns.

The replication of computed columns is supported by function strings. In Replication Server version 15.0, the class-level function string rs_set_dml_on_computed is applied at the replicate database DSI when a connection is established. It issues set dml_on_computed “on” after the use database statement. If the replicate Adaptive Server is version 12.5.x or earlier, the command is ignored.

Since Replication Server does not distinguish between computed and regular columns, there are no changes to the syntax for creating or altering replication definitions.

When creating or altering replication definitions for tables containing:

rs_subcmp support for computed columns

rs_subcmp supports comparison and reconciliation of materialized computed columns; it does not support virtual columns.

If the supported Adaptive Server provides the set dml_on_computed “on” command, rs_subcmp inserts and updates deterministic and nondeterministic materialized columns as regular columns.