我得到以下错误
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的文章,但我不知道这发生在哪个数据库中。这个错误被频繁地抛出,并且错误日志以每天1GB的速度增长。
我得到以下错误
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的文章,但我不知道这发生在哪个数据库中。这个错误被频繁地抛出,并且错误日志以每天1GB的速度增长。
当前回答
做图形。
数据库右键点击——>属性——>文件——>选择数据库所有者——>选择[sa]——ok
其他回答
另一种方法
ALTER AUTHORIZATION
ON DATABASE::[DatabaseName]
TO [A Suitable Login];
做图形。
数据库右键点击——>属性——>文件——>选择数据库所有者——>选择[sa]——ok
进入属性-文件。 所有者名称必须为空。只要在用户名中输入“sa”,问题就会得到解决。
在Security下,将主体添加为“未登录的SQL用户”,使其拥有与主体同名的模式,然后在Membership中将其设置为db_owner。
当意外地将数据库连接字符串提供给只读镜像时也有此错误-而不是HA设置中的主数据库。