问题
I have SQL Server setup as a publisher for merge replication. I only want my subscribers to receive the rows in a table that have a certain value in a particular column. Only when the status column has a value of Completed do I want the subscribers to have that row.
This is easy with a static row filter that I have indeed setup and works as expected. Each subscriber only gets rows that have the value of Completed the status column.
BUT...the problem is that when the value in that column changes from Uncompleted to Completed it does not then get automatically sent to the subscriber when they next sync. Likewise, if it goes from Completed to Uncompleted then the sync does not remove it from the subscriber. Instead you have to force a new snapshot to be created and sent to subscribers. Forcing this everyday is not practical given the size of the database.
What I would like is that when the status value changes it then causes the next synchronize from all subscribers to either delete it or download it depending on the new value. Is this possible?
来源:https://stackoverflow.com/questions/28466090/sql-server-static-row-replication-with-updates-based-on-changing-column-value