SQL Server static row replication with updates based on changing column value?

被刻印的时光 ゝ 提交于 2019-12-11 02:14:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!