You get this message when trying to create a SQL Database diagram
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.
After restoring a database from another server you see this
Solution
use [YourDatabaseName] EXEC sp_changedbowner 'sa'
For SQL 2005, delete the file:
C:\Documents and Settings\<USER>\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
For SQL 2008, the file location, format and name changed:
C:\Documents and Settings\<USER>\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
How to clear the list:
- Shut down all instances of SSMS
- Delete/Rename the file
- Open SSMS