because the principal "dbo" does not exist 问题解决方法

时间:2021-12-20 10:41:15

在做复制时,要删除一个发布,遇到错误:

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.

解决方法:

这个库是我直接从一个2K5备份文件上恢复到2K8实例的,没有做其它设定。

因为我是在sa登录遇到此错误

 

USE master
GO
EXEC
sys.sp_dbcmptlevel @dbname = N'MyDB',@new_cmptlevel = 90 GO USE MyDB GO EXEC sys.sp_changedbowner @loginame = sa,@map = 'dbowner' GO