I am getting the following error
Cannot execute as the database principal because the principal \"dbo\" does not exist, this type of principal cannot be imp
I resolved this issue by setting database owner. My database did not have had any owner before this issue. Execute this command in your database to set owner to sysadmin account:
use [YourDatabaseName] EXEC sp_changedbowner 'sa'