SQL Server 中的异步触发器

发布于 2024-09-26 19:11:59 字数 75 浏览 0 评论 0原文

我需要知道“异步触发器”的含义是什么,以及异步触发器与SQL Server中在插入、更新、删除之后或之前使用的普通触发器之间有什么区别。

I need to know what is the meaning of "asynchronous trigger" and is there difference between asynchronous triggers and the normal triggers that is used in SQL Server after or before inserting, updating, deleting.

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

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

发布评论

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

评论(1

与君绝 2024-10-03 19:11:59

我认为您对服务代理感到困惑。

触发器始终在给定事务的上下文中同步执行。如果您需要从触发器调用异步进程,请使用服务代理

它基本上就像一个队列 - 您发送东西到队列,然后可以继续您的业务,而无需等待它完成。

然而,还有更多的内容,请阅读链接。

I think you're getting confused with Service Brokers.

Triggers always execute synchronously, in the context of a given transaction. If you need to invoke an asynchronous process from within a trigger, use a Service Broker.

It's basically like a Queue - you send things to the queue, then can go on about your business without waiting for it to finish.

However, there is a lot more to it than that, have a read of the link.

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