Managing Source/Target Table Schema Changes

Detection and Repair of Source Table Schema Changes

Syniti Data Replicationis able to detect table schema changes on the source table for transactional replications in two ways:

  • When the Replication Agent finds a schema change record (DDL) in the database transaction log

  • When validating a schema using the Validate Replication dialog in the Management Center

If the Stop on Schema Change property in the Replication Properties dialog Preferences tab is also set to True, the following occurs:

  1. The Replication Agent disables a replication when a schema change operation is detected.

  2. The replication cannot be enabled or executed by the Replication Agent without updating the schema.

  3. The Replication Monitor shows the ValidationResult field as Fail.

To repair the replication status, use the Rebuild feature in the Validate Replications dialog. After prompting with details on the steps to be performed, Rebuild updates the table schema and sets the replication validation status to Success. Rebuild does not re-enable a replication.

NOTE: Following schema updates, it is advisable to check the field mapping between source and target tables using the Fields Mapping dialog available in the Replication Properties.

Proactive Update of Source/Target Schemas

Alternatively, if you are aware of a change in the structure of source or target tables after setting up your connections and any replications, you can update the schema information stored in the metadata using the Refresh Schema Information option available on all source and target table, schema and connection nodes in the Metadata Explorer. Please do not confuse this refresh with the replication mode or the initial refresh of a mirroring or synchronization.

  1. Stop the Replication Agent or disable the replication(s) accessing the affected table(s) by right clicking on the replications and clicking on the checked Enable entry.

  2. Right click on the source/target table(s), schema(s) or connection(s) and choose Refresh Schema Information.
    If you have changed more than one table in a schema or on a connection you can right click on the schema or connection and choose Refresh Schema Information rather than separately doing this on each table.

  3. Enable the replication(s) again.

Note that this operation only updates metadata information about the table(s). It does not cause another initial refresh replication and does not change any properties for replications which use that table as a source or target table. If you make changes to a source and/or target table already involved in a replication, you must manually change the replication properties to reflect these changes.