Service Broker 所需的端口
有谁知道 SQL Server 上是否有一个绝对必须打开的端口才能允许服务代理流量?我们正在测试当您关闭 SQL Server 上除(1433、445、3389)之外的所有端口并且查询通知仍然有效时会发生什么。我们的印象是,服务代理必须打开 4022 才能将其用作默认侦听端口。
是否有 SQL 系统视图显示服务代理正在哪个端口上进行通信?
是否有命令可以终止数据库上的所有活动查询通知,以便可以删除数据库?
谢谢
Does anyone know if there is a port that absolutely has to be open on the SQL server to allow service broker traffic? We were testing what happens when you close off all ports on the SQL server except (1433, 445, 3389) and the query notification still worked. We were under the impression that 4022 has to be open for the service broker to work we a default listening port.
Is there a SQL system view that shows what port the service broker is communicating on?
Is there a command to terminate all active query notifications on a database so the database can be dropped?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您的服务代理架构在服务器(端点)之间传递消息,那么它将需要除普通 SQL 端口之外的端口。
如果客户端代码(例如查询通知)正在访问服务代理,那么它会通过标准 SQL 连接使用 SQL 语句(带有一些新语法),并且此部分不使用任何其他端口。
If your service broker architecture is passing messages between servers (endpoints) then it will need ports other than the normal SQL ones.
If client code such as query notifications is accessing service broker then it uses SQL statements (with some new syntax) through the standard SQL connection and this part doesn't use any additional ports.
来自如何:激活 Service Broker 网络 (Transact-SQL):
创建端点时,您专门分配要使用的端口:
Service Broker 与其他代理实例通信时使用端口 4022。您如何使用 Service Broker?如果所有工作都在数据库内部,那么它永远不需要使用 TCP 端点。
From How to: Activate Service Broker Networking (Transact-SQL):
When you create an endpoint you specifically assign a port to use:
Port 4022 is used when Service Broker communicates with other broker instances. How are you using Service Broker? If all the work is internal to your database then it never needs to use a TCP endpoint.
查询通知不需要 Service Broker 端点,因为它始终在本地传递消息,即在您启动通知的同一数据库中。尽管配置 QN 向远程计算机发送通知是可能的,但基本上是闻所未闻的。请参阅神秘通知。
至于问题:Service Broker 仅要求打开配置的端点端口。可以在
sys.tcp_endpoints
。 如果配置的身份验证是 Windows,则还需要 Kerberos/NTLM 所需的端口(135、?389)才能对 SSB 连接进行身份验证。请注意,SSB 从来都不需要 SMB 端口 (445)。如果 SSB 端点配置的身份验证是证书,则不需要其他端口。请参阅基于证书的身份验证如何工作。Query Notification does not require a Service Broker endpoint because it always deliver the messages locally, int he same DB where you started the notifications from. Although configuring QN to deliver notifications to a remote machine is possible, ding so is basically unheard of. See The Mysterious Notification.
As for the question: Service Broker requires only the configured endpoint port to be open. You can see the listening port in
sys.tcp_endpoints
. If the configured authentication is Windows then the ports needed for Kerberos/NTLM (135, ?389) are also required in order to authenticate the SSB connections. Note that the SMB port (445) is not required by SSB ever. If SSB endpoint configured authentication is certificates then no additional port is required. See How does Certificate based Authentication work.