如何更改队列/服务的目标服务名称

发布于 2024-09-15 11:00:28 字数 578 浏览 5 评论 0原文

我有一个 SQL Server 2005 Service Broker 队列“ProductChangeMes​​sages”和一个 Service Broker 服务“ProductChangeNotifications”。这对是对 SqlDependency 的支持,我试图开始工作,但依赖项的 OnChanged 不会触发。当正在监视的表发生更改时,订阅(通过 select * from sys.dm_qn_subscriptions 的结果可见)将被删除。

SELECT * FROM sys.transmission_queue 显示的队列上有消息,其队列名称为 to_service_name,并且在 transmission_status

找不到目标服务名称。确保正确指定服务名称和/或已提供路由信息。

因此,似乎生成消息的任何内容都试图使用队列名称而不是服务名称作为 to_service_name

我如何更改它以便它使用正确的服务名称?

I have a SQL Server 2005 Service Broker queue "ProductChangeMessages" and a Service Broker service "ProductChangeNotifications". The pair are the backing to an SqlDependency I'm trying to get working but the OnChanged of the dependency doesn't fire. When the table being watched changes the subscription (visible through the results of select * from sys.dm_qn_subscriptions) is removed.

There are messages on the queue shown by SELECT * FROM sys.transmission_queue which have the queue name as their to_service_name and in the transmission_status they have

The target service name could not be found. Ensure that the service name is specified correctly and/or the routing information has been supplied.

So it appears that whatever is generating the message is trying to use the queue name rather than the service name as the to_service_name.

How can I change this so that it is using the right service name?

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

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

发布评论

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

评论(1

情绪操控生活 2024-09-22 11:00:28

你不能。首先,您需要从依赖项基础设施中使用正确的服务名称进行订阅。

要清理现有消息,您可以使用 big nuke 选项:alter database设置 new_broker 并立即回滚; 这将清除每个现有的对话/消息,但会保留所有服务/队列。细粒度选项是通过enddialog来一一终止坏对话框。与清理

You cannot. You need to subscribe with the proper service name from your dependency infrastructure to begin with.

To clean up the existing messages, you can use the big nuke option: alter database <dbname> set new_broker with rollback immediate; which will wipe out every single existing dialog/message, but will leave in place all services/queues. The fine grained option is to terminate the bad dialogs one by one via end dialog <handle> with cleanup.

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