I was hoping someone could clear up a question I have about merge replication in Sql Server 2000.
It appears to me the process of replication basically creates records in a merge table(s) from triggers that fire when data is modified on the publisher and/or subscriber within an identified article(s).
Periodically, the merge replication agent runs which pushes/pulls the changes to/from the publisher to/from the subscriber.
Now, assuming the above is close to the actual process, my question involves exactly what happens when a subscriber database is restored. I would assume that once a record is replicated to the subscriber, the merge agent marks that record as having been replicated and no longer attempts to do anything with it. Perhaps even removes it from the merge table altogether.
So if the subscriber database contains a table, say tblSubscriber that has received replicated data every hour from 12:00AM until 10:00AM. The database fails at 10:00AM and must be restored from the full backup that was done at 12:00AM(no transaction log backups on MSDE). Replication restarts after the successful restore. All of the data that was replicated from 12:00AM until 10:00AM will be basically lost at this point on the subscriber won't it? Surely the merge agent will not examine the restored database and realize that it is missing the replicated data from 12:00 to 10:00 an re-push it out will it?
Similarly, if the merge tables within the subscriber had not pushed yet when the backup was done, after the restore, won't the agent try to re-push these records from subscriber to publisher since it does not know they have been pushed already?
Hopefully I haven't complicated this question with too much detail. Just trying to understand what happens in a replicated environment when a database restore must be done on the subscriber. It almost seems to me that a new snapshot should be taken and applied and then replication continued.
TIA,
J
It appears to me the process of replication basically creates records in a merge table(s) from triggers that fire when data is modified on the publisher and/or subscriber within an identified article(s).
Periodically, the merge replication agent runs which pushes/pulls the changes to/from the publisher to/from the subscriber.
Now, assuming the above is close to the actual process, my question involves exactly what happens when a subscriber database is restored. I would assume that once a record is replicated to the subscriber, the merge agent marks that record as having been replicated and no longer attempts to do anything with it. Perhaps even removes it from the merge table altogether.
So if the subscriber database contains a table, say tblSubscriber that has received replicated data every hour from 12:00AM until 10:00AM. The database fails at 10:00AM and must be restored from the full backup that was done at 12:00AM(no transaction log backups on MSDE). Replication restarts after the successful restore. All of the data that was replicated from 12:00AM until 10:00AM will be basically lost at this point on the subscriber won't it? Surely the merge agent will not examine the restored database and realize that it is missing the replicated data from 12:00 to 10:00 an re-push it out will it?
Similarly, if the merge tables within the subscriber had not pushed yet when the backup was done, after the restore, won't the agent try to re-push these records from subscriber to publisher since it does not know they have been pushed already?
Hopefully I haven't complicated this question with too much detail. Just trying to understand what happens in a replicated environment when a database restore must be done on the subscriber. It almost seems to me that a new snapshot should be taken and applied and then replication continued.
TIA,
J