Sunday, November 16, 2008

NOT FOR REPLICATION - SQL 2005

In some cases, it is desirable for user activity in a replication topology to be treated differently from agent activity. For example, if a row is inserted by a user at the Publisher and that insert satisfies a check constraint on the table, it might not be required to enforce the same constraint when the row is inserted by a replication agent at the Subscriber. The NOT FOR REPLICATION option allows you to specify that the following database objects are treated differently when a replication agent performs an operation:

Foreign key constraints
The foreign key constraint is not enforced when a replication agent performs an insert, update, or delete operation.

Check constraints
The check constraint is not enforced when a replication agent performs an insert, update, or delete operation.

Identity columns
The identity column value is not incremented when a replication agent performs an insert operation.

Triggers
The trigger is not executed when a replication agent performs an insert, update, or delete operation.

---------------------------------------------------------------
http://msdn.microsoft.com/en-us/library/ms152529(SQL.90).aspx

No comments:

Follow by Email