SQL Server Service Broker 问题和解决方案 教程
我一直在考虑在 SQL Server Express 2005 中实现外部激活器,并将队列、服务、契约和事件通知添加到数据库中。 我还添加了一个触发器来将消息发送到目标队列。 一切都在解析、运行,并且触发器正在触发。 但是,当我从目标队列中选择或使用快速 T-SQL 脚本从队列接收时,什么也没有。
我想知道:
- 这怎么可能? 消息是自动接收的吗?
- 有没有办法在发送消息时检查消息是否正确到达?
- 触发触发器后是否有更好的方法在服务器上异步运行进程?
顺便说一句,很好的 Service Broker 教程材料很难找到。 如果谁有资源请告诉我。 现在,我正在阅读我们公司在线资源中的一本书,但即便如此,过滤起来也很痛苦。
谢谢,
威廉
I've been looking into implementing an external activator in SQL Server Express 2005, and I added the queues, services, contracts, and event notifications to the database. I also added a trigger to send a message to the target queue. Everything parses, runs, and the trigger is firing. However, when I select from the target queue, or use a quick T-SQL script to receive from the queue, nothing is there.
I'm wondering:
- How is that even possible? Are the messages being auto-received?
- Is there any way to check while sending a message if it arrived correctly?
- Is there a better way to run a process on the server asynchronously after a trigger is fired?
As an aside, good tutorial material for the Service Broker is hard to find. If anyone has any resources, please let me know. Right now, I'm reading a book from our companies' online resource but even that is a pain to filter through.
Thanks,
William
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在回答您的第一个问题时,希望您会在 sys.transmission_queue 系统视图中看到一些内容。 看
http://msdn.microsoft.com/en-us/library/ms190336。 aspx 获取相关文档。
如果你谷歌一下,你也可能会找到一些有用的故障排除资源。
戴夫
In answer to your first question, hopefully, you'll see something in the sys.transmission_queue system view. See
http://msdn.microsoft.com/en-us/library/ms190336.aspx for documentation on that.
If you Google that, you might find some useful troubleshooting resources too.
Dave
John,
我最近才开始研究服务代理,以便在数据库实例之间实现异步消息传递。 我发现以下内容对于我理解它非常有用。
http://msdn.microsoft.com/en-us /library/bb839489(SQL.90).aspx
John,
I've only recently begun looking into the service broker in order to implement asynch messaging between DB instances. I found the following to be quite useful in getting my head around it.
http://msdn.microsoft.com/en-us/library/bb839489(SQL.90).aspx