Hello,
I have a small database (.mdf)file which I attached in SSMS so that I can see the tables in the Object Explorer. However I am unable to create Database Diagram for this database and I receive and error each time I attempt to do that. So I can't establish any relationships or perform any action.
ERROR: Cannot execute as the database principal because the principal "dbo" does not exist. This type of principal cannot be impersonated or you don not have permission. (MSSQL Server Error 15517)
In Visual Studio I can open the database as an ADO.Net Entity Framework Model but cannot create any relationships there either. So, the database is a group of unrelated tables, that are more-or-less useless.
Any constructive suggestions would be helpful.
Thanks.
What I have tried:
I have recreated the tables several times, but have not entirely recreated the database from scratch.