Skip to content

Commit 10338df

Browse files
authored
Update update-statements-replicated-as-delete-insert.md
1 parent 0c601cb commit 10338df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

support/sql/database-engine/replication/update-statements-replicated-as-delete-insert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ UPDATE TABLE1 set col1 = 3 where col3 = 'Dallas'
3939

4040
The `UPDATE` statement is implemented by SQL Server as a pair of `DELETE`/`INSERT` statements since you're updating `col1`, which has a unique index defined. Thus, the log reader places a pair of `DELETE`/`INSERT` calls in the distribution database. This can impact any business logic that is present in the triggers or custom stored procedures at the Subscriber. You should incorporate the additional business logic in `DELETE` and `INSERT` triggers or stored procedures to handle this situation.
4141

42-
If you prefer to use single logic and you want all your `UPDATE` commands replicated as `DELETE`/`INSERT` pairs, you can enable [Trace Flag 8207](/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql#tf8207).
42+
If you prefer to replicate single row updates as `UPDATE`, not as `DELETE`/`INSERT` pairs, you can enable [Trace Flag 8207](/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql#tf8207).
4343

4444
Additionally, if you use a horizontal filter in your publication and if the updated row doesn't meet a filter condition, only a `DELETE` procedure call is sent to the subscribers. If the updated row previously didn't meet the filter condition but meets the condition after the update, only the `INSERT` procedure call is sent through the replication process.
4545

0 commit comments

Comments
 (0)