Reputation: 876
I have a SQL Server 2019 database that I restored from a SQL Server 2017 backup. It has diagrams present in the System Tables dbo.sysdiagrams table, but they are not visible. If I try to create a diagram I get an error:
What is the problem and how do I fix it?
Thank you,
Upvotes: 3
Views: 3406
Reputation: 11
I recommend database properties > Select File > Select on Owner > Select your system account, set it, then Click on OK.
Upvotes: 1
Reputation: 876
The suggestion from Randy led to a resolution. In looking at the DB files properties there was no owner.
I tried to set the owner to my Windows logon, but that led to an error because there was an existing reference to it. Then, I set the owner to sa and that worked.
The diagrams are now accessible.
The only remaining question concerns a possible conflict with the owner of some objects assigned to my Windows login and the files owned by sa.
Upvotes: 3
Reputation: 1143
A shot in the dark...likely a good one. Check the database owner to make sure it is set. It might have been a login that is not valid on this instance. Not having a owner can cause access issues in SSMS.
Upvotes: 3