Version-controlled updates

You can use version-control updates to:

Updates are accepted or rejected based on a version column that changes each time the row is updated. The version column can be a number that increases with each update, a timestamp, or some other value from a set of unique values.

To update a row, an application must provide the current value of the version column at the primary site. Typically, the value is provided as a parameter to a replicated stored procedure. The stored procedure at the primary site checks the version parameter and takes appropriate action if it detects a conflict. If the application chooses to roll back the transaction, it is written to the exceptions log.

NoteManaging update conflicts using version control requires careful planning and design. When there are multiple primaries, it is usually simpler and more effective to establish owners for each row of a table.