【情景】
以前运行没有问题的存储过程现在运行报错
【报错】
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.
【解决】
选中对应数据库》右键》属性》所有者:选择sa
对应SQL:
USE datayesdb
GO
sp_changedbowner sa