If you meet with the same error as me in SSMS 2016.
“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 (Microsoft SQL Server, Error: 15517)”
use [databasename] GO EXEC sp_changedbowner 'sa' GO
Hope this solution can help you.
If you are interested in some high income skills or have any problems with SQL and SSMS, feel free to contact me .
Or you can connect with me through my LinkedIn.