Service Broker 主密钥的要求
我在各种 MSDN 页面和 SQL Server 博客中读到,Service Broker 数据库“通常”需要主密钥。
事实上,当尝试接收消息时,我收到以下应用程序事件日志消息:
Service Broker 需要访问 数据库中的主密钥 “MDR_REPLICATION_Z”。错误代码:26。 主密钥必须存在并且 服务主密钥加密是 必填。
令我困惑的是,当我所有的对话都已关闭加密时,为什么会发生这种情况。
有没有一种方法可以在加密处于关闭状态的单个数据库内部使用 Service Broker,而无需创建数据库主密钥?
I have read in various MSDN pages and SQL Server blogs that "usually" a Master Key is required in a Service Broker database.
Indeed, when trying to RECEIVE messages I get the following application event log message:
Service Broker needs to access the
master key in the database
'MDR_REPLICATION_Z'. Error code:26.
The master key has to exist and the
service master key encryption is
required.
What confuses me is why this is happening when all my CONVERSATIONs have ENCRYPTION = OFF.
Is there a way to make use of Service Broker internally within a single database where ENCYRPTION is OFF without having to create a Database Master Key?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自 Service Broker 对话安全性:
换句话说,请确保您没有任何匹配的远程服务绑定。
From Service Broker Dialog Security:
In other words, make sure you don't have any matching remote service bindings.
另一种方法是为服务代理创建一个主密钥。
首先通过右键单击队列并查看传输队列来检查您的服务代理队列
或者简单地使用此查询
如果您在这里找到任何数据,那么 Transmission_status 列将有原因。
如果代理没有发挥其作用,我将使用以下查询创建 NEW_BROKER
然后将 TRUSTWORTHY 设置为 ON 启用代理
最后,删除主密钥并创建新的主密钥并使用新密码加密:
密码可以是用户定义的混合字母数字和符号。
如果上述任何步骤需要较长时间运行,那么我建议您停止查询并重新打开 SQL 管理器并重试。应该效果很好!!
Alternative would be creating a master key for the service broker.
First Check your service broker queue by right clicking the queue and View Transmission Queue
or simply use this query
If you find any data in here then transmission_status column will have the reason for this.
If the broker is not playing its role, I would create NEW_BROKER with following query
Then Enable the BROKER with TRUSTWORTHY set to ON
Finally, dropping the master key and Creating New master key and encrypt by new password:
Password could be a user defined mixture of alphanumeric and symbols.
If any of the above steps taking longer time to run, then I would suggest you to stop the query and reopen the SQL manager and try again. It should work well!!
我找到了解决方案。
即使我的BEGIN对话框中指定的目标服务包含在同一个数据库中,我也需要明确以下事实:目标服务位于同一数据库内。
这是通过在指定目标服务时添加可选的
CURRENT DATABASE
来完成的:I found the solution.
Even though the target service specified in my BEGIN DIALOG is contained in the same database, I needed to be explicit about the fact that the target service was within the same database.
This is done by adding the optional
CURRENT DATABASE
when specifying the target service: