SQL Server 中的异步触发器
我需要知道“异步触发器”的含义是什么,以及异步触发器与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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您对服务代理感到困惑。
触发器始终在给定事务的上下文中同步执行。如果您需要从触发器内调用异步进程,请使用服务代理。
它基本上就像一个队列 - 您发送东西到队列,然后可以继续您的业务,而无需等待它完成。
然而,还有更多的内容,请阅读链接。
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.