仅在发布服务器上运行的 SQL 触发器

发布于 2024-08-18 20:37:10 字数 477 浏览 3 评论 0原文

我有一个内部应用程序,它同时具有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

够钟 2024-08-25 20:37:10

您是否无法通过在触发器创建中使用 NOT FOR REPLICATION 子句来完成仅发布者触发器?

Could you not accomplish Publisher only triggers by using the NOT FOR REPLICATION clause in the trigger creation?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文