是否可以在不提供整个发布快照的情况下更改 SQL Server 复制过滤器?
我经常被要求更改我公司 SQL Server 事务发布的过滤器,其中包含数百个表和大约 400GB 的行数据。
每次需要更改过滤器时,我都必须完全重新拍摄整个出版物并将其交付给订阅者,这个过程几乎需要一整天才能完成。
我的问题:是否可以在不提供整个发布快照的情况下更改 SQL Server 复制过滤器?
I am constantly asked to change the filters on my companies SQL Server Transactional Publications which contain several hundred tables and roughly 400GBs of row data.
Each time I am required to alter a filter, I have to completely re-snapshot the entire publication and deliver it to the subscriber, a process which takes nearly an entire day to complete.
My question: It is possible to alter SQL Server replication filter without delivering an entire publication snapshot?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须从出版物中删除表格(文章),然后使用新的过滤器重新添加它。诀窍是,如果您在从发布中删除文章之前删除对该文章的订阅,则不需要为所有文章提供完整快照 - 而仅针对单个表(并且它是新的过滤器)。
现在,将文章添加回订阅的最简单方法是通过复制发布 GUI,
您可以添加文章,添加过滤器,然后单击“确定”。当您运行快照作业时,它只会生成单个表的快照。这称为迷你快照。
如果您想手动将文章及其过滤器重新添加到出版物中,那么您需要执行以下操作才能将其重新添加到订阅中。
--您现在需要手动将任何新列添加到订阅者的目标表中,重新运行将运行迷你快照的快照代理...然后启动分发者。
You have to drop the table (article) from the publication and re-add it with a new filter. The trick is that if you remove the subscription to the article before removing the article from the publication, you will not be required to deliver an entire snapshot for all article – but only for the single table (and it’s new filter).
Now, the easiest way to add the article back to the subscription is through the replication publication GUI,
you can add the article, add the filter then click ok. When you run the snapshot job, it will only generate a snapshot for the single table. This is known as a mini-snapshot.
If you want to manually re-add the article and its filter to the publication then you'll need to do the following to get it back into the subscription.
--You will now need to manually add any new columns to the destination table at the subscriber, re-run the snapshot agent which will run a mini-snapshot... then kick off the distributor.