Service Broker 无法工作的问题修复

来源:互联网 发布:mac 重启finder 编辑:程序博客网 时间:2024/06/06 19:20

数据库的Service Broker在通过备份/还原方式恢复数据库后,通过SELECT * FROM sys.transmission_queue 查到的错误信息:

An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.

解决办法:

ALTER AUTHORIZATION ON DATABASE::[yourdatabase] TO [sa];

原创粉丝点击