仅在发布服务器上运行的 SQL 触发器
我有一个内部应用程序,它同时具有 Web 界面和桌面界面(是使用合并复制的 OCA)。我们仍在使用 SQL 2005,并设置了许多“存档”表。这些由相关表
上的触发器填充。 tblPersonArchive
for tblPerson
等。为了使复制集尽可能小,我想从复制中排除所有存档表。
从业务角度来看,这不应该是一个问题,因为用户永远不会直接访问该数据。它实际上不需要存在于使用复制的桌面应用程序上。
那么,我想要弄清楚的是如何实现这一目标。我的“猜测”是我设置了 Publication Properties -->文章属性 --> Copy User Triggers = FALSE
,然后从复制集中排除存档表。理论上,触发器仍然会触发,因此仍然通过 Web 应用程序和复制来维护存档表。
不幸的是,这只是目前的猜测,我希望在投入之前能得到一点保证。
I have an in house app that has both a Web Interface and a Desktop Interface(is an OCA using Merge Replication). We are still using SQL 2005 and have many 'Archive' tables set up. These are filled by Triggers on there relating Table
. tblPersonArchive
for tblPerson
, etc. To keep the Replication Sets as small as possible I would like to exclude ALL of the Archive tables from replicating.
This shouldn't be an issue from a Business standpoint as that data is never accessed directly by the user's. There is literally no need for it to exist on the Desktop app that is using replication.
What I am trying to figure out, then, is how I accomplish that. My "guess" is that I set the Publication Properties --> Article Properties --> Copy User Triggers = FALSE
and then exclude the Archive Tables from the Replication Set. Theoretically the Triggers will still fire, and thus still maintain, the Archive tables through the Web App and on Replication.
Unfortunately, this is only a guess at this point and I was hoping for a little reassurance before plowing in.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否无法通过在触发器创建中使用 NOT FOR REPLICATION 子句来完成仅发布者触发器?
Could you not accomplish Publisher only triggers by using the NOT FOR REPLICATION clause in the trigger creation?