Change to merge publication with reinitialization of subscription results in differences between publisher and subscriber data


i have sql server 2005 database published using merge publication uses filter on host_name() along join filters send subset of data subscribers , uses web sync via rmo. filtering setup for accounts using replicationaccount table includes accountids subscribers have access , table filtered host_name(); account table linked replicationaccount table join filter , other account tables (like accountnote) linked account table further join filters.

i want change publication's account article set 'copy user triggers' property false , requires reinitialization of subscriptions need make sure account changes made subscribers sent published db , reloaded subscriber db. make change i've done following:

1. change publication's automatic reinitialization policy upload first:
exec sp_changemergepublication @publication='publication', @property=n'automatic_reinitialization_policy', @value=n'1'

2. change article disable copy of user triggers (which requires reinitialization of subscriptions):
exec sp_changemergearticle @publication='publication', @article='account', @property=n'schema_option', @value=n'0x000000000c034ed1', @force_invalidate_snapshot=1, @force_reinit_subscription=1

3. start snapshot agent job change requires creation of new snapshot:
exec sp_startpublication_snapshot @publication='publication'

my problem when subscriber has updated account , synchronizes - in case change sent published db after being initialized subscriber's account table includes old account record without change. there no problems subscriber inserts these sent published db , reloaded subscriber's account table.

i have unsuccessfully tried various means ensure subscriber gets correct/latest record updating records in replicationaccount table, manually marking subscription reinitialization , cleaning data partition. thought force subscriber correct/latest account record deleting , re-creating replicationaccount records when tried subscriber's sync errored message:

the merge process failed because detected mismatch between replication metadata of 2 replicas, such changes lost leading non-convergence. due subscriber not having synchronized within retention period, or because of 1 of replicas being restored backup older retention period, or because of publisher performing more aggressive cleanup on articles of type download-only , articles partition_options = 3.
the common generation watermark invalid @ replica since not exist or metadata changes not yet propagated may have been cleaned up.

sorry if that's bit long winded i'd appreciate might able offer.

chris



SQL Server  >  SQL Server Replication



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........