Replication Server applies the following command to the replicate table before insert:
set identity_insert table_name on
Replication Server applies the following command to the replicate table after insert:
set identity_insert table_name off
For any table containing an identity column, the maintenance user must be the owner of the table (or must be the “dbo” user or aliased to the “dbo” login name) at the replicate database in order to use the Transact-SQL identity_insert option.