替换DB Trigger机制

发布于 2024-09-18 01:09:49 字数 185 浏览 1 评论 0原文

我正在使用 SQL Server (2005)。 今天我有一些表,每次其中的数据发生变化时我都会得到数据库触发器 (通过sql server触发机制实现)并处理它。 问题是触发机制的性能很差,并且处理它并不是一件非常有趣的事情。现在回答我的问题。有谁知道每当特定表上的数据发生更改时从 sql server 获取通知的任何不同方式。(删除、添加、更新)?

I'm using SQL Server (2005).
Today I have some tables that everytime the data inside them changes I get DB trigger
(implemented via the sql server trigger mechanism) and handles it.
the problem is that the trigger mechanism has bad performance and handling with it is not exaclly afun thing to do. now to my question. is anybody knows any diffrent way to get notification from sql server whenever a data on a specific table changes.(deleted,added,updated) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

迷途知返 2024-09-25 01:09:49

SQL Server 查询通知是在 SQL Server 2005 中引入的,并且正是这样做的。我同意最好看看你的触发器正在做什么,以衡量是否适合你的具体情况。

SQL Server Query Notifications were introduced in SQL Server 2005 and do exactly this. I agree it would be good to see what your trigger is doing though to gauge suitability for your specific case.

剧终人散尽 2024-09-25 01:09:49

不,2005 不是这样。2008R2 有一个机制,但在 2005 中没有触发器的替代机制。

No, not with 2005. 2008R2 has a mechanism for that, but in 2005 there is no alternative mechanism to triggers.

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