• psteja2000 (7/31/2012)


    mh,

    Can you post the source link to your explanation? I am doubtful that while reinitialization everything is dropped/deleted and recreated.

    Hi Psteja

    Replication is a complicated subject of MSSQL server. The following links are a start, but I suggest that you spend an hour or two reading how replication works, books online is your friend.

    Replication requires the publisher and subscriber to have the same starting point when you start the synchronization, from here you start applying changes since the snapshot was created, this is where the logagent comes into place. The reason you are "missing" your rows is because the delete commands on the publisher is replicated to the subscriber the moment replication is initialized(reinitialized).

    If you want to run a script after the shapshot is applied but before the synchronization start this is also an option.

    Create and Apply the Snapshot

    http://msdn.microsoft.com/en-us/library/ms151785

    Documentation of the sp_addarticle command (check the [ @pre_creation_cmd =] 'pre_creation_cmd'):

    http://msdn.microsoft.com/en-us/library/ms173857.aspx