SQL Server – User Account Mismatch

permissionssql server

My disk crashed so I reinstalled SQL Server to a new drive and restored my databases from my backup drive. However, when I attempt to install Diagram support, I get this message:

Cannot execute as the database principal because the principal "dbo" does not exist….

This issue is admirably answered here but the reply doesn't seem to apply in my case since running the first query in the "Solution" section returns no records so I have nothing to fix, yet I get that error message.

Here are my results from the queries suggested in that reply:
Database Principals
Server Principals

Please inform me how to resolve this matter.

Best Answer

The owner of your database on the old server was some Windows account that does not exists as login on the new server (if it existed, its login sid would match user sid as it's Windows account, so it's Windows sid).

To fix it you can make sa the owner of your database:

alter authorization on database::YourDBName to sa

Or any other login (I just don't see other logins on your picture that are not certificate logins)